Bug 103396

Summary: Fix cdefs.h for older GCCs
Product: libbsd Reporter: Adam Lackorzynski <adam>
Component: libbsdAssignee: Guillem Jover <guillem>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
i915 platform: i915 features:
Attachments: Patch

Description Adam Lackorzynski 2017-10-21 21:10:28 UTC
Created attachment 134980 [details] [review]


this change is required for GCCs not yet supporting __has_include and __has_include_next:

diff --git a/include/bsd/sys/cdefs.h b/include/bsd/sys/cdefs.h
index 044f221..b4c8f30 100644
--- a/include/bsd/sys/cdefs.h
+++ b/include/bsd/sys/cdefs.h
@@ -25,10 +25,10 @@
 #ifndef __has_include
-#define __has_include 1
+#define __has_include(x) 1
 #ifndef __has_include_next
-#define __has_include_next 1
+#define __has_include_next(x) 1

Thanks, Adam
Comment 1 Peter Kjellerstedt 2017-12-03 23:37:11 UTC
I ran into this when building with GCC 4.7.2 and came up with the same fix, so please apply.
Comment 2 Guillem Jover 2018-01-13 16:37:16 UTC
This has been merged and released now with 0.8.7, thanks. Closing.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.