From: fweimer@redhat.com (Florian Weimer)
To: libc-stable@sourceware.org
Subject: [2.27 COMMITTED] Use _STRUCT_TIMESPEC as guard in <bits/types/struct_timespec.h> [BZ #23349]
Date: Mon, 01 Jan 2018 00:00:00 -0000 [thread overview]
Message-ID: <20180704112513.44EA343994575@oldenburg.str.redhat.com> (raw)
After commit d76d3703551a362b472c866b5b6089f66f8daa8e ("Fix missing
timespec definition for sys/stat.h (BZ #21371)") in combination with
kernel UAPI changes, GCC sanitizer builds start to fail due to a
conflicting definition of struct timespec in <linux/time.h>. Use
_STRUCT_TIMESPEC as the header file inclusion guard, which is already
checked in the kernel header, to support including <linux/time.h> and
<sys/stat.h> in the same translation unit.
(cherry picked from commit c1c2848b572ea7f92b7fa81dd5b1b9ef7c69b83b)
2018-06-28 Florian Weimer <fweimer@redhat.com>
[BZ #23349]
* time/bits/types/struct_timespec.h: Change header inclusion guard to
_STRUCT_TIMESPEC.
diff --git a/NEWS b/NEWS
index 2dab66e851..f6e33734c8 100644
--- a/NEWS
+++ b/NEWS
@@ -80,6 +80,7 @@ The following bugs are resolved with this release:
[23236] Harden function pointers in _IO_str_fields
[23259] Unsubstituted ${ORIGIN} remains in DT_NEEDED for AT_SECURE
[23264] libc: posix_spawnp wrongly executes ENOEXEC in non compat mode
+ [23349] Various glibc headers no longer compatible with <linux/time.h>
\f
Version 2.27
diff --git a/time/bits/types/struct_timespec.h b/time/bits/types/struct_timespec.h
index 644db9fdb6..5b77c52b4f 100644
--- a/time/bits/types/struct_timespec.h
+++ b/time/bits/types/struct_timespec.h
@@ -1,5 +1,6 @@
-#ifndef __timespec_defined
-#define __timespec_defined 1
+/* NB: Include guard matches what <linux/time.h> uses. */
+#ifndef _STRUCT_TIMESPEC
+#define _STRUCT_TIMESPEC 1
#include <bits/types.h>
reply other threads:[~2018-07-04 11:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180704112513.44EA343994575@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=libc-stable@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).