]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix compilation with clang-cl on windows
authorDeniz Bahadir <deniz@code.bahadir.email>
Thu, 23 Dec 2021 00:13:03 +0000 (01:13 +0100)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 9 Feb 2022 21:03:03 +0000 (22:03 +0100)
Do not include (system) headers when processing these headers with the
resource compiler, because it might trip over the headers coming from
LLVM.

zlib-ng.h.in
zlib.h.in

index 30deabf1d4691fd9b0199eee5fbc88eee711e704..9274f75e6f5e4a8ed43a3360afa8872d3b01b3d5 100644 (file)
@@ -33,6 +33,7 @@
 #  error Include zlib-ng.h for zlib-ng API or zlib.h for zlib-compat API but not both
 #endif
 
+#ifndef RC_INVOKED
 #include "zconf-ng.h"
 
 #include <stdint.h>
@@ -40,6 +41,7 @@
 #ifndef ZCONFNG_H
 #  error Missing zconf-ng.h add binary output directory to include directories
 #endif
+#endif  /* RC_INVOKED */
 
 #ifdef __cplusplus
 extern "C" {
index 1c2944cef4296396705ddc4a505465dffcdf9e24..d170e25c9cad2d2cd88cadbd1df1fdd3e79e4639 100644 (file)
--- a/zlib.h.in
+++ b/zlib.h.in
@@ -34,6 +34,7 @@
 #  error Include zlib-ng.h for zlib-ng API or zlib.h for zlib-compat API but not both
 #endif
 
+#ifndef RC_INVOKED
 #include "zconf.h"
 
 #include <stdint.h>
@@ -42,6 +43,7 @@
 #ifndef ZCONF_H
 #  error Missing zconf.h add binary output directory to include directories
 #endif
+#endif  /* RC_INVOKED */
 
 #ifdef __cplusplus
 extern "C" {