From c718882ffb5f5f36eae8a1c08f3002f6b2b62df7 Mon Sep 17 00:00:00 2001 From: olszomal Date: Tue, 29 Nov 2022 12:47:20 +0100 Subject: [PATCH] Fix macro redefinition --- msi.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/msi.h b/msi.h index 881ed04..0099c78 100644 --- a/msi.h +++ b/msi.h @@ -122,8 +122,12 @@ #error "Cannot determine the endian-ness of this platform" #endif +#ifndef LOWORD #define LOWORD(x) (x & 0xFFFF) -#define HIWORD(x) (x >> 16) +#endif /* LOWORD */ +#ifndef HIWORD +#define HIWORD(x) ((x >> 16) & 0xFFFF) +#endif /* HIWORD */ #if BYTE_ORDER == BIG_ENDIAN #define LE_UINT16(x) ((((x) >> 8) & 0x00FF) | \