[PATCH][BZ 18234] struct stat is not posix conform

Carlos O'Donell carlos@redhat.com
Wed May 20 16:54:00 GMT 2015


On 05/20/2015 11:58 AM, Florian Weimer wrote:
> On 05/20/2015 05:20 PM, Szabolcs Nagy wrote:
>> the generic definition of struct stat on linux miss the
>> st_atim, st_mtim and st_ctim members when _POSIX_C_SOURCE
>> is defined (affects at least aarch64 and arm).
> 
> Does this need to be conditional on the POSIX version?
> 

This is already done by features.h.

e.g.
#if (_POSIX_C_SOURCE - 0) >= 200809L
# define __USE_XOPEN2K8         1
# undef  _ATFILE_SOURCE
# define _ATFILE_SOURCE 1
#endif

Which should define __USE_XOPEN2K8 as expected.

My worry is that you've changed the semantics since __USE_MISC
was previously used.

Cheers,
Carlos.



More information about the Libc-alpha mailing list