This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] GDB Namespaces - Define MSG_CMSG_CLOEXEC if not defined.
- From: Michael Eager <eager at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 16 Jun 2015 14:18:25 -0000
- Subject: [binutils-gdb] GDB Namespaces - Define MSG_CMSG_CLOEXEC if not defined.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4da680addb9f9c22f24f0294b8b9b9ca52cecd7f
commit 4da680addb9f9c22f24f0294b8b9b9ca52cecd7f
Author: Michael Eager <eager@eagercon.com>
Date: Tue Jun 16 07:18:03 2015 -0700
GDB Namespaces - Define MSG_CMSG_CLOEXEC if not defined.
2015-06-16 Michael Eager <eager@eagercon.com>
* nat/linux-namespaces.c (MSG_CMSG_CLOEXEC): Define if not defined.
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/nat/linux-namespaces.c | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ad00902..4a6c529 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2015-06-16 Michael Eager <eager@eagercon.com>
+
+ * nat/linux-namespaces.c (MSG_CMSG_CLOEXEC): Define if not defined.
+
2015-06-16 Patrick Palka <patrick@parcs.ath.cx>
* tui/tui-hooks.c (tui_selected_frame_level_changed_hook): Call
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