]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Compilation error with __has_attribuute operator 3294/head
authorThierry Fournier <thierry.fournier@ozon.io>
Sun, 8 Mar 2020 09:16:13 +0000 (10:16 +0100)
committerThierry Fournier <thierry.fournier@ozon.io>
Mon, 9 Mar 2020 12:39:03 +0000 (13:39 +0100)
GCC recommands to add alternative to __has_attribute operator:

https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005fattribute.html

config.h.in

index cad62df81d197a5d87047be4c1f05229069ef041..013a0873cef09922b45d13d0105f5ace948550ac 100644 (file)
@@ -375,8 +375,12 @@ typedef off_t goffset;
 #  endif
 #elif defined(__GNUC__)
 /* GCC based */
-#  if __has_attribute(__no_sanitize_address__)
-#    define RSPAMD_NO_SANITIZE __attribute__((no_sanitize_address))
+#  if defined(__has_attribute)
+#    if __has_attribute(__no_sanitize_address__)
+#      define RSPAMD_NO_SANITIZE __attribute__((no_sanitize_address))
+#    else
+#      define RSPAMD_NO_SANITIZE
+#    endif
 #  else
 #    define RSPAMD_NO_SANITIZE
 #  endif