From: Arran Cudbard-Bell Date: Mon, 22 Dec 2014 22:07:04 +0000 (-0500) Subject: clang and gcc use different pragmas to turn off warnings about unknown pragmas *gunshot* X-Git-Tag: release_3_0_7~412 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc5b7523fa572d3611581a150a47c03f4c7bf43a;p=thirdparty%2Ffreeradius-server.git clang and gcc use different pragmas to turn off warnings about unknown pragmas *gunshot* --- diff --git a/src/include/build.h b/src/include/build.h index a006d016745..79332303c18 100644 --- a/src/include/build.h +++ b/src/include/build.h @@ -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) */ diff --git a/src/modules/rlm_rest/rest.c b/src/modules/rlm_rest/rest.c index 62b21b46881..dcaec7f7813 100644 --- a/src/modules/rlm_rest/rest.c +++ b/src/modules/rlm_rest/rest.c @@ -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 {\