]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
clang and gcc use different pragmas to turn off warnings about unknown pragmas *gunshot*
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 22 Dec 2014 22:07:04 +0000 (17:07 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 22 Dec 2014 22:07:04 +0000 (17:07 -0500)
src/include/build.h
src/modules/rlm_rest/rest.c

index a006d0167450e165c4cd9ed74a9de2ee1960089e..79332303c184a2eb19445080cf981b733cc06f9b 100644 (file)
@@ -77,6 +77,15 @@ extern "C" {
 #  define DIAG_ON(_x)
 #endif
 
+/*
+ *     GCC and clang use different macros
+ */
+#ifdef __clang__
+# define DIAG_OPTIONAL DIAG_OFF(unknown-pragmas)
+#else
+# define DIAG_OPTIONAL DIAG_OFF(pragmas)
+#endif
+
 /*
  *     For dealing with APIs which are only deprecated in OSX (like the OpenSSL API)
  */
index 62b21b4688156938872caadeb3fb922eaca06199..dcaec7f7813ffe28c9cebadc9c87d10599bf9b18 100644 (file)
@@ -93,7 +93,7 @@ const http_body_type_t http_body_type_supported[HTTP_BODY_NUM_ENTRIES] = {
  *
  *  #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
  */
-DIAG_OFF(pragmas)
+DIAG_OPTIONAL
 DIAG_OFF(disabled-macro-expansion)
 #define SET_OPTION(_x, _y)\
 do {\