1 /* Setting a POSIX version on FreeBSD causes other functions to become hidden. 2 */ 3 #ifndef __FreeBSD__ 4 #define _POSIX_C_SOURCE 200809L 5 #endif 6 7 #include <assert.h> 8 #include <errno.h> 9 #include <inttypes.h> 10 #include <limits.h> 11 #include <pthread.h> 12 #include <setjmp.h> 13 #include <stdarg.h> 14 #include <stdbool.h> 15 #include <stddef.h> 16 #include <stdint.h> 17 #include <stdio.h> 18 #include <stdlib.h> 19 #include <string.h> 20 #include <unistd.h> 21 22 #ifdef __linux__ 23 #include <linux/version.h> 24 #endif 25 26 #ifdef __APPLE__ 27 #include <sandbox.h> 28 #elif defined(__FreeBSD__) 29 #include <sys/capsicum.h> 30 #elif defined(__linux__) 31 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) 32 #include <linux/audit.h> 33 #include <linux/filter.h> 34 #include <linux/seccomp.h> 35 #include <sys/prctl.h> 36 #include <sys/socket.h> 37 #include <sys/syscall.h> 38 #endif 39 #endif 40