summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sched.h1
-rw-r--r--include/sys/acct.h75
-rw-r--r--include/sys/socket.h4
-rw-r--r--include/unistd.h2
4 files changed, 82 insertions, 0 deletions
diff --git a/include/sched.h b/include/sched.h
index 9062772b..3df4c7bd 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -59,6 +59,7 @@ int sched_yield(void);
#define CLONE_IO 0x80000000
int clone (int (*)(void *), void *, int, void *, ...);
int unshare(int);
+int setns(int, int);
#endif
#ifdef __cplusplus
diff --git a/include/sys/acct.h b/include/sys/acct.h
new file mode 100644
index 00000000..ee576c4a
--- /dev/null
+++ b/include/sys/acct.h
@@ -0,0 +1,75 @@
+#ifndef _SYS_ACCT_H
+#define _SYS_ACCT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <features.h>
+#include <endian.h>
+#include <time.h>
+#include <stdint.h>
+
+#define ACCT_COMM 16
+
+typedef uint16_t comp_t;
+
+struct acct
+{
+ char ac_flag;
+ uint16_t ac_uid;
+ uint16_t ac_gid;
+ uint16_t ac_tty;
+ uint32_t ac_btime;
+ comp_t ac_utime;
+ comp_t ac_stime;
+ comp_t ac_etime;
+ comp_t ac_mem;
+ comp_t ac_io;
+ comp_t ac_rw;
+ comp_t ac_minflt;
+ comp_t ac_majflt;
+ comp_t ac_swaps;
+ uint32_t ac_exitcode;
+ char ac_comm[ACCT_COMM+1];
+ char ac_pad[10];
+};
+
+
+struct acct_v3
+{
+ char ac_flag;
+ char ac_version;
+ uint16_t ac_tty;
+ uint32_t ac_exitcode;
+ uint32_t ac_uid;
+ uint32_t ac_gid;
+ uint32_t ac_pid;
+ uint32_t ac_ppid;
+ uint32_t ac_btime;
+ float ac_etime;
+ comp_t ac_utime;
+ comp_t ac_stime;
+ comp_t ac_mem;
+ comp_t ac_io;
+ comp_t ac_rw;
+ comp_t ac_minflt;
+ comp_t ac_majflt;
+ comp_t ac_swaps;
+ char ac_comm[ACCT_COMM];
+};
+
+#define AFORK 1
+#define ASU 2
+#define ACORE 8
+#define AXSIG 16
+#define ACCT_BYTEORDER (128*(__BYTE_ORDER==__BIG_ENDIAN))
+#define AHZ 100
+
+int acct(const char *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 97d78871..4afec4ef 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -255,6 +255,10 @@ int sockatmark (int);
#define SHUT_WR 1
#define SHUT_RDWR 2
+#ifdef _GNU_SOURCE
+int accept4(int, struct sockaddr *__restrict, socklen_t *__restrict, int);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/include/unistd.h b/include/unistd.h
index b5206a61..4f6953c4 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -171,6 +171,7 @@ int daemon(int, int);
void setusershell(void);
void endusershell(void);
char *getusershell(void);
+int acct(const char *);
#endif
#ifdef _GNU_SOURCE
@@ -181,6 +182,7 @@ int getresuid(uid_t *, uid_t *, uid_t *);
int getresgid(gid_t *, gid_t *, gid_t *);
char *get_current_dir_name(void);
int pipe2(int [2], int);
+int dup3(int, int, int);
#endif
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)