This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] <sys/stat.h>: Use Linux kernel UAPI header if available and useful
- From: Andreas Schwab <schwab at suse dot de>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 05 Jun 2019 17:12:44 +0200
- Subject: Re: [PATCH] <sys/stat.h>: Use Linux kernel UAPI header if available and useful
- References: <87zhmwt76d.fsf@oldenburg2.str.redhat.com>
On Jun 05 2019, Florian Weimer <fweimer@redhat.com> wrote:
> * io/bits/statx.h: Fix typo in error message. Include
> <linux/stat.h> is available. Define statx-related constants only
s/is/if/
> diff --git a/io/bits/statx.h b/io/bits/statx.h
> index cff14b2543..d0dcc353ba 100644
> --- a/io/bits/statx.h
> +++ b/io/bits/statx.h
> @@ -19,9 +19,14 @@
> /* This interface is based on <linux/stat.h> in Linux. */
>
> #ifndef _SYS_STAT_H
> -# error Never include <bits/stat.x.h> directly, include <sys/stat.h> instead.
> +# error Never include <bits/statx.h> directly, include <sys/stat.h> instead.
> #endif
>
> +#if __glibc_has_include (<linux/stat.h>)
> +# include <linux/stat.h>
> +#endif
Wouldn't it be better to add sysdeps/unix/sysv/linux/bits/statx.h where
<linux/stat.h> is included unconditionally?
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."