Commit 39ff58c2754e6efb266bae5783715e181fe78a12

Pali Rohár 2019-07-25T20:32:53

Do not include intrin.h file Include file intrin.h is not needed for compiling dlfcn.c as _ReturnAddress intrinsic is defined in dlfcn.c manually. Moreover _ReturnAddress is available only as an intrinsic, there is no function implementation. So even including intrin.h file does not provide function variant for _ReturnAddress. More important, include file intrin.h is not available in older Windows Driver Kit 7.1.0. So removing usage of intrin.h file makes compilation of dlfcn-win32 also under these older WDK versions.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/dlfcn.c b/dlfcn.c
index ce06d93..1815ae0 100644
--- a/dlfcn.c
+++ b/dlfcn.c
@@ -30,7 +30,6 @@
 
 #ifdef _MSC_VER
 /* https://docs.microsoft.com/en-us/cpp/intrinsics/returnaddress */
-#include <intrin.h>
 #pragma intrinsic(_ReturnAddress)
 #else
 /* https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html */