#define __NEED_size_t
#define __NEED_off_t
+#if defined(_GNU_SOURCE)
+#define __NEED_ssize_t
+#endif
+
#include <bits/alltypes.h>
#include <bits/mman.h>
#ifdef _GNU_SOURCE
void *mremap (void *, size_t, size_t, int, ...);
+int remap_file_pages (void *, size_t, int, ssize_t, int);
#endif
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
extern "C" {
#endif
+#define __NEED_clockid_t
+
+#include <bits/alltypes.h>
+
#include <sys/time.h>
struct ntptimeval {
#define MAXTC 6
int adjtimex(struct timex *);
+int clock_adjtime(clockid_t, struct timex *);
#ifdef __cplusplus
}
char *get_current_dir_name(void);
int pipe2(int [2], int);
int dup3(int, int, int);
+void syncfs(int);
#endif
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
--- /dev/null
+#define _GNU_SOURCE
+#include <time.h>
+#include <sys/timex.h>
+#include "syscall.h"
+
+int clock_adjtime (clockid_t clock_id, struct timex *utx)
+{
+ return syscall(SYS_clock_adjtime, clock_id, utx);
+}
--- /dev/null
+#define _GNU_SOURCE
+#include <sys/mman.h>
+#include "syscall.h"
+
+int remap_file_pages(void *addr, size_t size, int prot, ssize_t pgoff, int flags)
+{
+ return syscall(SYS_remap_file_pages, addr, size, prot, pgoff, flags);
+}
--- /dev/null
+#define _GNU_SOURCE
+#include <unistd.h>
+#include "syscall.h"
+
+void syncfs(int fd)
+{
+ __syscall(SYS_syncfs, fd);
+}