From c527fd1f14c27855a37f2e8ac5346ce8d940ced2 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 16 Oct 2014 03:05:19 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- .../uclibc-git/0002-wire-setns-syscall.patch | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 meta/recipes-core/uclibc/uclibc-git/0002-wire-setns-syscall.patch (limited to 'meta/recipes-core/uclibc/uclibc-git/0002-wire-setns-syscall.patch') diff --git a/meta/recipes-core/uclibc/uclibc-git/0002-wire-setns-syscall.patch b/meta/recipes-core/uclibc/uclibc-git/0002-wire-setns-syscall.patch new file mode 100644 index 0000000000..94c6f68571 --- /dev/null +++ b/meta/recipes-core/uclibc/uclibc-git/0002-wire-setns-syscall.patch @@ -0,0 +1,68 @@ +From db575359d4b8164ad6c2ac5f36c7a50c065a2864 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 20 Feb 2014 00:44:34 -0800 +Subject: [PATCH 2/3] wire setns syscall + +Signed-off-by: Khem Raj +Upstream-Status: Pending +--- + libc/sysdeps/linux/common/Makefile.in | 1 + + libc/sysdeps/linux/common/bits/sched.h | 4 ++++ + libc/sysdeps/linux/common/setns.c | 18 ++++++++++++++++++ + 3 files changed, 23 insertions(+) + create mode 100644 libc/sysdeps/linux/common/setns.c + +diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in +index 45d2e21..10d9884 100644 +--- a/libc/sysdeps/linux/common/Makefile.in ++++ b/libc/sysdeps/linux/common/Makefile.in +@@ -45,6 +45,7 @@ CSRC-$(UCLIBC_LINUX_SPECIFIC) += \ + sendfile.c \ + setfsgid.c \ + setfsuid.c \ ++ setns.c \ + setresgid.c \ + setresuid.c \ + signalfd.c \ +diff --git a/libc/sysdeps/linux/common/bits/sched.h b/libc/sysdeps/linux/common/bits/sched.h +index a5eb6ee..9436f66 100644 +--- a/libc/sysdeps/linux/common/bits/sched.h ++++ b/libc/sysdeps/linux/common/bits/sched.h +@@ -85,6 +85,10 @@ extern int unshare (int __flags) __THROW; + + /* Get index of currently used CPU. */ + extern int sched_getcpu (void) __THROW; ++ ++/* Switch process to namespace of type NSTYPE indicated by FD. */ ++extern int setns (int __fd, int __nstype) __THROW; ++ + #endif + + __END_DECLS +diff --git a/libc/sysdeps/linux/common/setns.c b/libc/sysdeps/linux/common/setns.c +new file mode 100644 +index 0000000..376bf26 +--- /dev/null ++++ b/libc/sysdeps/linux/common/setns.c +@@ -0,0 +1,18 @@ ++/* vi: set sw=4 ts=4: */ ++/* ++ * setns() for uClibc ++ * ++ * Copyright (C) 2014 Khem Raj ++ * ++ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. ++ */ ++ ++#include ++#include ++ ++/* ++ * setns() ++ */ ++#ifdef __NR_setns ++_syscall2(int, setns, int, fd, int, nstype) ++#endif +-- +1.9.0 + -- cgit v1.2.3-54-g00ecf