GDB Namespaces - Define MSG_CMSG_CLOEXEC if not defined.
authorMichael Eager <eager@eagercon.com>
Tue, 16 Jun 2015 14:18:03 +0000 (07:18 -0700)
committerMichael Eager <eager@eagercon.com>
Tue, 16 Jun 2015 14:18:03 +0000 (07:18 -0700)
2015-06-16  Michael Eager  <eager@eagercon.com>

* nat/linux-namespaces.c (MSG_CMSG_CLOEXEC): Define if not defined.

gdb/ChangeLog
gdb/nat/linux-namespaces.c

index ad00902..4a6c529 100644 (file)
@@ -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
index f18e40d..a7a3e4d 100644 (file)
@@ -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