This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [glibc] <sys/stat.h>: Use Linux UAPI header for statx if available and useful


On Jun 14 2019, Florian Weimer <fweimer@redhat.com> wrote:

> 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")

FWIW, this gets mangled by fixincludes:

@@ -26,7 +35,7 @@
 
 /* Use "" to work around incorrect macro expansion of the
    __has_include argument (GCC PR 80005).  */
-#if __glibc_has_include ("linux/stat.h")
+#if __glibc_has_include ("__linux__/stat.h")
 # include "linux/stat.h"
 # ifdef STATX_TYPE
 #  define __statx_timestamp_defined 1

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]