summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Duncan Ogilvie2024-11-28 18:37:52 +0100
committerGravatar Nikias Bassen2024-11-29 04:26:45 +0100
commit22a4e4c79f8eeac3e200996997d3494bc0677304 (patch)
tree1178f061d55d7e7bb0b92146acca25cf1e89079f /include
parentcdede2b53effd8cb63f32606e93070091149c0af (diff)
downloadlibusbmuxd-22a4e4c79f8eeac3e200996997d3494bc0677304.tar.gz
libusbmuxd-22a4e4c79f8eeac3e200996997d3494bc0677304.tar.bz2
Change __attribute__((__packed__)) to #pragma pack(push, 1)
Diffstat (limited to 'include')
-rw-r--r--include/usbmuxd-proto.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/usbmuxd-proto.h b/include/usbmuxd-proto.h
index 38473f5..d004232 100644
--- a/include/usbmuxd-proto.h
+++ b/include/usbmuxd-proto.h
@@ -57,28 +57,30 @@ enum usbmuxd_msgtype {
MESSAGE_PLIST = 8,
};
+#pragma pack(push, 1)
+
struct usbmuxd_header {
uint32_t length; // length of message, including header
uint32_t version; // protocol version
uint32_t message; // message type
uint32_t tag; // responses to this query will echo back this tag
-} __attribute__((__packed__));
+};
struct usbmuxd_result_msg {
struct usbmuxd_header header;
uint32_t result;
-} __attribute__((__packed__));
+};
struct usbmuxd_connect_request {
struct usbmuxd_header header;
uint32_t device_id;
uint16_t port; // TCP port number
uint16_t reserved; // set to zero
-} __attribute__((__packed__));
+};
struct usbmuxd_listen_request {
struct usbmuxd_header header;
-} __attribute__((__packed__));
+};
struct usbmuxd_device_record {
uint32_t device_id;
@@ -86,7 +88,9 @@ struct usbmuxd_device_record {
char serial_number[256];
uint16_t padding;
uint32_t location;
-} __attribute__((__packed__));
+};
+
+#pragma pack(pop)
#ifdef __cplusplus
}