This is the mail archive of the glibc-bugs@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]

[Bug libc/21371] Missing timespec definition when compiled with _XOPEN_SOURCE and _POSIX_C_SOURCE


https://sourceware.org/bugzilla/show_bug.cgi?id=21371

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  d76d3703551a362b472c866b5b6089f66f8daa8e (commit)
      from  a0704b1ac7e8dc26f0e0feac58468958305ae844 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d76d3703551a362b472c866b5b6089f66f8daa8e

commit d76d3703551a362b472c866b5b6089f66f8daa8e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Apr 17 10:38:53 2017 -0300

    Fix missing timespec definition for sys/stat.h (BZ #21371)

    As indicated by the bug report, the 'struct timespec' definition
    is not defined for '_XOPEN_SOURCE=700' and '_POSIX_C_SOURCE=200112L'.

    It is because current code only includes its definition if __USE_ATFILE
    is defined and the define is only set with:

      1. _GNU_SOURCE and/or _ATFILE_SOURCE definition.
      2. _POSIX_C_SOURCE >= 200809L

    However, the 'st_*' fields in 'struct stat' are defined if __USE_XOPEN2K8.
    This patch uses the same logic for 'struct timespec' inclusion.

    Tested on x86_64-linux-gnu.

        * io/sys/stat.h: Use __USE_XOPEN2K8 insteaf of __USE_ATFILE for
        struct timespec definition.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog     |    5 +++++
 io/sys/stat.h |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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