[HIDPARSER] Don't include pshpack1.h before including other headers
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 9 Jun 2021 08:54:05 +0000 (10:54 +0200)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 10 Jun 2021 06:52:22 +0000 (08:52 +0200)
NEVER DO THIS! It is guaranteed to be wrong. Instead always individually pack single structures that need packing.
This fixes USB mouse on 64 bit builds.

sdk/lib/drivers/hidparser/parser.h

index 5e11539..32061da 100644 (file)
@@ -2,7 +2,6 @@
 #define _HIDPARSER_H_
 
 #include <wdm.h>
-#include <pshpack1.h>
 #define _HIDPI_
 #define _HIDPI_NO_FUNCTION_MACROS_
 #include <hidpddi.h>
@@ -84,6 +83,7 @@ typedef struct
     UCHAR Tag:4;
 }ITEM_PREFIX, *PITEM_PREFIX;
 
+#include <pshpack1.h>
 typedef struct
 {
     ITEM_PREFIX Prefix;
@@ -99,6 +99,7 @@ typedef struct
     }Data;
 
 }SHORT_ITEM, *PSHORT_ITEM;
+#include <poppack.h>
 
 typedef struct
 {