https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9229e73f03afc07880121f27797be5927b0a3552

commit 9229e73f03afc07880121f27797be5927b0a3552
Author:     Timo Kreuzer <[email protected]>
AuthorDate: Wed Jun 9 10:54:05 2021 +0200
Commit:     Timo Kreuzer <[email protected]>
CommitDate: Thu Jun 10 08:52:22 2021 +0200

    [HIDPARSER] Don't include pshpack1.h before including other headers
    
    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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sdk/lib/drivers/hidparser/parser.h 
b/sdk/lib/drivers/hidparser/parser.h
index 5e115399b50..32061daa4b9 100644
--- a/sdk/lib/drivers/hidparser/parser.h
+++ b/sdk/lib/drivers/hidparser/parser.h
@@ -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
 {

Reply via email to