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: [PATCH] <sys/stat.h>: Use Linux kernel UAPI header if available and useful


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


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