Bug 103396 - Fix cdefs.h for older GCCs
Summary: Fix cdefs.h for older GCCs
Status: RESOLVED FIXED
Alias: None
Product: libbsd
Classification: Unclassified
Component: libbsd (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Guillem Jover
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-21 21:10 UTC by Adam Lackorzynski
Modified: 2018-01-13 16:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch (708 bytes, patch)
2017-10-21 21:10 UTC, Adam Lackorzynski
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Lackorzynski 2017-10-21 21:10:28 UTC
Created attachment 134980 [details] [review]
Patch

Hi,

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
 #endif
 #ifndef __has_include_next
-#define __has_include_next 1
+#define __has_include_next(x) 1
 #endif
 
 #ifdef LIBBSD_OVERLAY

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.