summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2020-10-19 02:03:02 +0200
committerAndrew Bartlett <abartlet@samba.org>2020-11-10 06:53:43 +0000
commitaa8d6c779ca89d6be1c8b973d3ea60e6073bf899 (patch)
tree82dd44c58e37d09b97eefa3d075e6c186ec89af7 /pidl
parent3c1013caf4b57c6af5a5d210df232c08a1227a17 (diff)
downloadsamba-aa8d6c779ca89d6be1c8b973d3ea60e6073bf899.tar.gz
pidl: use unused attribute only if supported by feature macro
Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 76a094b625b..578e17d1cbc 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -2304,12 +2304,14 @@ $ndr_hdr_include
* functions
*/
#ifndef _MAYBE_UNUSED_
-#ifdef HAVE___ATTRIBUTE__
+#ifdef __has_attribute
+#if __has_attribute(unused)
#define _MAYBE_UNUSED_ __attribute__ ((unused))
#else
#define _MAYBE_UNUSED_
#endif
#endif
+#endif
/*
* These functions are here to ensure they can be optimized out by
* the compiler based on the constant input values