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.
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 */