diff options
author | 2017-07-13 07:38:03 (GMT) | |
---|---|---|
committer | 2017-07-13 07:38:03 (GMT) | |
commit | 45c5bb0f484cba724be2c6105801dcce9a1a82d9 (patch) | |
tree | 8fd1c8eaa2ef203009d72b6ca6348611dcc5ee1c /packages/gdb/7.10/10-setns-handling.patch | |
parent | 8f8e131d566af1f577d8fb6e62e6f121b7955472 (diff) | |
parent | b32fcf7c1eea890a2bd3f88487f818ba241aabb1 (diff) |
Merge pull request #767 from stilor/packages
Packages
Diffstat (limited to 'packages/gdb/7.10/10-setns-handling.patch')
-rw-r--r-- | packages/gdb/7.10/10-setns-handling.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/packages/gdb/7.10/10-setns-handling.patch b/packages/gdb/7.10/10-setns-handling.patch new file mode 100644 index 0000000..e2647ad --- /dev/null +++ b/packages/gdb/7.10/10-setns-handling.patch @@ -0,0 +1,52 @@ +From 99fe86f7999afd2743b08c550b10f083ae4bd9bd Mon Sep 17 00:00:00 2001 +From: Peter Bergner <bergner@vnet.ibm.com> +Date: Tue, 14 Jul 2015 10:46:16 -0500 +Subject: [PATCH] Fix build issue with nat/linux-namespaces.c. + + * nat/linux-namespaces.c (setns): Rename from this ... + (do_setns): ... to this. Support calling setns if it exists. + (mnsh_handle_setns): Call do_setns. +--- + gdb/ChangeLog | 6 ++++++ + gdb/nat/linux-namespaces.c | 12 ++++++------ + 2 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/gdb/nat/linux-namespaces.c b/gdb/nat/linux-namespaces.c +index a7a3e4d..fd0d4b0 100644 +--- a/gdb/nat/linux-namespaces.c ++++ b/gdb/nat/linux-namespaces.c +@@ -34,18 +34,18 @@ int debug_linux_namespaces; + + /* Handle systems without setns. */ + +-#ifndef HAVE_SETNS +-static int +-setns (int fd, int nstype) ++static inline int ++do_setns (int fd, int nstype) + { +-#ifdef __NR_setns ++#ifdef HAVE_SETNS ++ return setns (fd, nstype); ++#elif defined __NR_setns + return syscall (__NR_setns, fd, nstype); + #else + errno = ENOSYS; + return -1; + #endif + } +-#endif + + /* Handle systems without MSG_CMSG_CLOEXEC. */ + +@@ -495,7 +495,7 @@ mnsh_recv_message (int sock, enum mnsh_msg_type *type, + static ssize_t + mnsh_handle_setns (int sock, int fd, int nstype) + { +- int result = setns (fd, nstype); ++ int result = do_setns (fd, nstype); + + return mnsh_return_int (sock, result, errno); + } +-- +1.9.4 |