Add "wrapper" files for system headers which produce errors.
authorAlan T. DeKok <aland@freeradius.org>
Sat, 4 Jan 2014 15:27:02 +0000 (10:27 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 4 Jan 2014 15:27:02 +0000 (10:27 -0500)
This allows us to build with ZERO compile-time warnings.

src/include/wrapper/README [new file with mode: 0644]
src/include/wrapper/openssl_ocsp.h [new file with mode: 0644]
src/include/wrapper/pcap.h [new file with mode: 0644]
src/main/radsniff.c
src/main/tls.c

diff --git a/src/include/wrapper/README b/src/include/wrapper/README
new file mode 100644 (file)
index 0000000..bcd1061
--- /dev/null
@@ -0,0 +1,7 @@
+The files in this directory are "wrapper" files.  They do nothing more
+than set a pragma, and include the system header file.
+
+The purpose of these wrappers is to remove compile-time warnings.
+They are NEVER installed.  Any file in the parent directory MUST NOT
+include any "wrapper" file.  Only the C source files can include the
+wrappers.
diff --git a/src/include/wrapper/openssl_ocsp.h b/src/include/wrapper/openssl_ocsp.h
new file mode 100644 (file)
index 0000000..cd2744b
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma GCC system_header
+#include <openssl/ocsp.h>
diff --git a/src/include/wrapper/pcap.h b/src/include/wrapper/pcap.h
new file mode 100644 (file)
index 0000000..5713f88
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma GCC system_header
+#include <pcap.h>
index cd735f7..07de6bf 100644 (file)
@@ -26,7 +26,7 @@ RCSID("$Id$")
 #define _LIBRADIUS 1
 #include <freeradius-devel/libradius.h>
 
-#include <pcap.h>
+#include <freeradius-devel/wrapper/pcap.h>
 
 #include <freeradius-devel/radpaths.h>
 #include <freeradius-devel/conf.h>
index c32fde5..100e99b 100644 (file)
@@ -47,7 +47,7 @@ USES_APPLE_DEPRECATED_API     /* OpenSSL API has been deprecated by Apple */
 #endif
 
 #ifdef HAVE_OPENSSL_OCSP_H
-#include <openssl/ocsp.h>
+#include <freeradius-devel/wrapper/openssl_ocsp.h>
 #endif
 
 static void tls_server_conf_free(fr_tls_server_conf_t *conf);