aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2019-10-02 10:00:40 -0700
committerAlistair Francis <alistair.francis@wdc.com>2019-10-02 12:26:06 -0700
commit0095a3e8d6fe89ff2bcfc83bbe190c0106dd4111 (patch)
tree1edf7ada4c73f16b2a4dd63c3831a85d4ef9c651
parenteed005270a472fe97e0a93540387bb8c81a8e36b (diff)
downloadglibc-0095a3e8d6fe89ff2bcfc83bbe190c0106dd4111.tar
glibc-0095a3e8d6fe89ff2bcfc83bbe190c0106dd4111.tar.gz
glibc-0095a3e8d6fe89ff2bcfc83bbe190c0106dd4111.tar.bz2
glibc-0095a3e8d6fe89ff2bcfc83bbe190c0106dd4111.zip
string/endian.h: Restore the __USE_MISC conditionals
Commit 69fd157a3 "time: Add padding for the timespec if required" caused a breakage in the glibc tests as the endian.h include file was kept in the networking headers while the __USE_MISC #ifdefs had been removed. This resulted in namespace violations in the networking headers. This patche restores the __USE_MISC conditionals in endian.h to fix the test failures. * string/endian.h: Restore the __USE_MISC conditionals.
-rw-r--r--ChangeLog4
-rw-r--r--string/endian.h12
2 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 893c07cd81..c0d97f5b4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-10-02 Alistair Francis <alistair.francis@wdc.com>
+
+ * string/endian.h: Restore the __USE_MISC conditionals.
+
2019-10-02 Joseph Myers <joseph@codesourcery.com>
* string/tester.c: Ignore -Warray-bounds and
diff --git a/string/endian.h b/string/endian.h
index 0eb534e434..1a9fe3c97e 100644
--- a/string/endian.h
+++ b/string/endian.h
@@ -23,12 +23,14 @@
/* Get the definitions of __*_ENDIAN, __BYTE_ORDER, and __FLOAT_WORD_ORDER. */
#include <bits/endian.h>
-#define LITTLE_ENDIAN __LITTLE_ENDIAN
-#define BIG_ENDIAN __BIG_ENDIAN
-#define PDP_ENDIAN __PDP_ENDIAN
-#define BYTE_ORDER __BYTE_ORDER
+#ifdef __USE_MISC
+# define LITTLE_ENDIAN __LITTLE_ENDIAN
+# define BIG_ENDIAN __BIG_ENDIAN
+# define PDP_ENDIAN __PDP_ENDIAN
+# define BYTE_ORDER __BYTE_ORDER
+#endif
-#ifndef __ASSEMBLER__
+#if defined __USE_MISC && !defined __ASSEMBLER__
/* Conversion interfaces. */
# include <bits/byteswap.h>
# include <bits/uintn-identity.h>