patch modified from 'misc-syscalls' by Dan Drown:
http://dan.drown.org/android/src/busybox/

Signed-off-by: Tias Guns <[email protected]>
---
 libbb/Kbuild.src |    3 +++
 libbb/getsid.c   |    6 ++++++
 2 files changed, 9 insertions(+)
 create mode 100644 libbb/getsid.c

diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src
index 61eec26..98031f4 100644
--- a/libbb/Kbuild.src
+++ b/libbb/Kbuild.src
@@ -187,3 +187,6 @@ lib-$(CONFIG_PGREP) += xregcomp.o
 lib-$(CONFIG_PKILL) += xregcomp.o
 lib-$(CONFIG_DEVFSD) += xregcomp.o
 lib-$(CONFIG_FEATURE_FIND_REGEX) += xregcomp.o
+
+# for android-busybox-ndk
+lib-y += getsid.o
diff --git a/libbb/getsid.c b/libbb/getsid.c
new file mode 100644
index 0000000..a938bd5
--- /dev/null
+++ b/libbb/getsid.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+#include <sys/syscall.h>
+
+pid_t getsid(pid_t pid) {
+  return syscall(__NR_getsid, pid);
+}
-- 
1.7.10

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to