[PATCH] include: Pick up the ms_hook_prologue attribute for Clang, too.
Chip Davis
cdavis at codeweavers.com
Wed Sep 11 10:34:23 CDT 2019
Signed-off-by: Chip Davis <cdavis at codeweavers.com>
---
include/winnt.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/winnt.h b/include/winnt.h
index 67d33f0d78fc..9c4174f310d6 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -163,7 +163,11 @@ extern "C" {
# define DECLSPEC_HIDDEN
#endif
-#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))) && (defined(__i386__) || defined(__x86_64__))
+#ifndef __has_attribute
+# define __has_attribute(x) 0
+#endif
+
+#if ((defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)))) || __has_attribute(ms_hook_prologue)) && (defined(__i386__) || defined(__x86_64__))
#define DECLSPEC_HOTPATCH __attribute__((__ms_hook_prologue__))
#else
#define DECLSPEC_HOTPATCH
--
2.21.0
More information about the wine-devel
mailing list