summaryrefslogtreecommitdiff
path: root/getsid.c
diff options
context:
space:
mode:
Diffstat (limited to 'getsid.c')
-rw-r--r--getsid.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/getsid.c b/getsid.c
new file mode 100644
index 00000000..b6d5313f
--- /dev/null
+++ b/getsid.c
@@ -0,0 +1,16 @@
+/*
+ * This file is Copyright (c) 2010 by the GPSD project
+ * BSD terms apply: see the file COPYING in the distribution root for details.
+ */
+#include "gpsd_config.h"
+
+#ifndef HAVE_GETSID
+#include <unistd.h>
+#include <sys/syscall.h>
+
+/* This implementation is required for Android */
+
+pid_t getsid(pid_t pid) {
+ return syscall(__NR_getsid, pid);
+}
+#endif /* HAVE_GETSID */