summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/syscall.c
diff options
context:
space:
mode:
authorDaniel Morante <daniel@morante.net>2020-08-09 21:58:37 -0400
committerAmar Tumballi <amar@kadalu.io>2020-08-20 09:30:17 +0000
commitdc515feae51e247270bb440e40b8346eb3af7b46 (patch)
tree47a040ede1dda6563bfcf0ab5095fd5b4acee427 /libglusterfs/src/syscall.c
parent097db13c11390174c5b9f11aa0fd87eca1735871 (diff)
Remove need for /proc on FreeBSD
Change-Id: Ieebd9a54307813954011ac8833824831dce6da10 Fixes: #1376
Diffstat (limited to 'libglusterfs/src/syscall.c')
-rw-r--r--libglusterfs/src/syscall.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libglusterfs/src/syscall.c b/libglusterfs/src/syscall.c
index 03e5924a1c3..04400f98b6c 100644
--- a/libglusterfs/src/syscall.c
+++ b/libglusterfs/src/syscall.c
@@ -13,6 +13,10 @@
#include "glusterfs/mem-pool.h"
#include "glusterfs/libglusterfs-messages.h"
+#ifdef __FreeBSD__
+#include <sys/sysctl.h>
+#include <signal.h>
+#endif
#include <sys/types.h>
#include <utime.h>
#include <sys/time.h>
@@ -854,3 +858,19 @@ sys_copy_file_range(int fd_in, off64_t *off_in, int fd_out, off64_t *off_out,
#endif /* HAVE_COPY_FILE_RANGE_SYS */
#endif /* HAVE_COPY_FILE_RANGE */
}
+
+#ifdef __FreeBSD__
+int
+sys_kill(pid_t pid, int sig)
+{
+ return FS_RET_CHECK0(kill(pid, sig), errno);
+}
+
+int
+sys_sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp,
+ const void *newp, size_t newlen)
+{
+ return FS_RET_CHECK0(sysctl(name, namelen, oldp, oldlenp, newp, newlen),
+ errno);
+}
+#endif