Browse Source

Let's be paranoid: force the packing on important shared structures.

Godzil 4 years ago
parent
commit
75a05048a4
1 changed files with 4 additions and 0 deletions
  1. 4 0
      include/fusd_msg.h

+ 4 - 0
include/fusd_msg.h

@@ -81,6 +81,8 @@
 /* other constants */
 #define FUSD_MSG_MAGIC      0x7a6b93cd
 
+#pragma pack(1)
+
 /* user->kernel: register a device */
 typedef struct {
   char name[FUSD_MAX_NAME_LENGTH+1];
@@ -148,4 +150,6 @@ typedef struct {
   int num_open;
 } fusd_status_t;
 
+#pragma pack()
+
 #endif /* __FUSD_MSG_H__ */