Michael Eager wrote:
On 06/15/2015 08:02 AM, Michael Eager wrote:
On 04/30/2015 05:05 AM, Gary Benson wrote:
This commit introduces new shared files linux-namespaces.[ch]
containing code to support Linux namespaces that will be used
by both GDB and gdbserver.
This patch causes a build failure in nat/linux-namespaces.c with
glibc-2.5, which does not define MSG_CMSG_CLOEXEC. It looks like
this symbol was introduced in glib-2.7.
Here is a patch which allows this to compile if the symbol is not
defined.
[snip]
Looks good, though maybe with a comment (below).
Please commit this.
Cheers,
Gary
--
diff --git a/gdb/nat/linux-namespaces.c b/gdb/nat/linux-namespaces.c
index f18e40d..a7a3e4d 100644
--- a/gdb/nat/linux-namespaces.c
+++ b/gdb/nat/linux-namespaces.c
@@ -47,6 +47,12 @@ setns (int fd, int nstype)
}
#endif
+/* Handle systems without MSG_CMSG_CLOEXEC. */
+
+#ifndef MSG_CMSG_CLOEXEC
+#define MSG_CMSG_CLOEXEC 0
+#endif
+
/* A Linux namespace. */
struct linux_ns