From aa8d6c779ca89d6be1c8b973d3ea60e6073bf899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= Date: Mon, 19 Oct 2020 02:03:02 +0200 Subject: pidl: use unused attribute only if supported by feature macro Signed-off-by: Bjoern Jacke Reviewed-by: Andrew Bartlett --- pidl/lib/Parse/Pidl/Samba4/Python.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pidl') 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 -- cgit v1.2.1