aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/unix/sysv/linux/bits/statx.h7
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4aae5e74f7..efd86e05ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2019-06-14 Florian Weimer <fweimer@redhat.com>
+ * sysdeps/unix/sysv/linux/bits/statx.h: Use string literal in
+ argument to __glibc_has_include to inhibit macro expansion.
+
+2019-06-14 Florian Weimer <fweimer@redhat.com>
+
* misc/sys/cdefs.h (__glibc_has_include): Do not use a
function-like macro, so that __has_include can inhibit expansion
of its argument.
diff --git a/sysdeps/unix/sysv/linux/bits/statx.h b/sysdeps/unix/sysv/linux/bits/statx.h
index d36f44efc6..206878723f 100644
--- a/sysdeps/unix/sysv/linux/bits/statx.h
+++ b/sysdeps/unix/sysv/linux/bits/statx.h
@@ -23,8 +23,11 @@
#endif
/* Use the Linux kernel header if available. */
-#if __glibc_has_include (<linux/stat.h>)
-# include <linux/stat.h>
+
+/* Use "" to work around incorrect macro expansion of the
+ __has_include argument (GCC PR 80005). */
+#if __glibc_has_include ("linux/stat.h")
+# include "linux/stat.h"
# ifdef STATX_TYPE
# define __statx_timestamp_defined 1
# define __statx_defined 1