I would suggest following patch, which removes the special
communication between ld.so and gdb.
While debugging a ld.so issue with gdb 8.0 on alpha, I recognized
that the debugger stalled when trying to execute this code.
It thought this code was added to help debugging ld.so, but it seems
nowadays it prevents to do so. May be bitrotted?
Does anyone found it useful while debugging ld.so with gdb in the
From: "Anthony G. Basile" <blueness(a)gentoo.org>
man feature_test_macros(7) specifies that _BSD_SOURCE and _SVID_SOURCE have
been deprecated in favor of _DEFAULT_SOURCE since libc 2.20. Specifying
either of the former is now equivalent to specifying just the latter. We add
this macro to conform to this standard, but do not add the compiler warning
to maintain full backwards compatibility with earlier version of glibc and
Signed-off-by: Anthony G. Basile <blueness(a)gentoo.org>
include/features.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/features.h b/include/features.h
index f9820791b..362b811fd 100644
@@ -40,6 +40,7 @@
_SVID_SOURCE ISO C, POSIX, and SVID things.
_ATFILE_SOURCE Additional *at interfaces.
_GNU_SOURCE All of the above, plus GNU extensions.
+ _DEFAULT_SOURCE Equivalent to defining _BSD_SOURCE and _SVID_SOURCE.
_REENTRANT Select additionally reentrant object.
_THREAD_SAFE Same as _REENTRANT, often used by other systems.
_FORTIFY_SOURCE If set to numeric value > 0 additional security
@@ -140,6 +141,19 @@
# define __GNUC_PREREQ(maj, min) 0
+/* _DEFAULT_SOURCE is equivalent to defining _BSD_SOURCE and _SVID_SOURCE
+ * and vice versa. */
+# undef _BSD_SOURCE
+# define _BSD_SOURCE 1
+# undef _SVID_SOURCE
+# define _SVID_SOURCE 1
+#if defined _BSD_SOURCE || defined _SVID_SOURCE
+# undef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE 1
/* If _BSD_SOURCE was defined by the user, favor BSD over POSIX. */
#if defined _BSD_SOURCE && \
I just noticed today that mkostemp64 calls __gen_tempname with mode
S_IRUSR | S_IWUSR | S_IXUSR, while all other flavors call it with mode
S_IRUSR | S_IWUSR, as per POSIX.1-2008.
See libc/stdlib/mkostemp64.c. I assume I don't need to send a patch