]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use _STRUCT_TIMESPEC as guard in <bits/types/struct_timespec.h> [BZ #23349]
authorFlorian Weimer <fweimer@redhat.com>
Thu, 28 Jun 2018 11:21:20 +0000 (13:21 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 28 Jun 2018 11:21:20 +0000 (13:21 +0200)
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)

ChangeLog
NEWS
time/bits/types/struct_timespec.h

index 6fba508ae14dde036a5e637d4b2afc056824e714..371ae547c4d9ab4b1d0eb051e38d3b3fe57a12f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-06-28  Florian Weimer  <fweimer@redhat.com>
+
+       [BZ #23349]
+       * time/bits/types/struct_timespec.h: Change header inclusion guard to
+       _STRUCT_TIMESPEC.
+
 2018-05-24  Gabriel F. T. Gomes  <gabriel@inconstante.eti.br>
 
        [BZ #23171]
diff --git a/NEWS b/NEWS
index 2dab66e85119b3b90a03ed72047ef7beabd0499f..f6e33734c8e6b57676fd0a0ce1810d438f1ac1e0 100644 (file)
--- 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
index 644db9fdb62062915fba7d829f0447e1e8961077..5b77c52b4f005701b1b91ded0b4edbe3520b1eb1 100644 (file)
@@ -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>