aboutsummaryrefslogtreecommitdiffstats
path: root/ports
diff options
context:
space:
mode:
Diffstat (limited to 'ports')
-rw-r--r--ports/linux/guts/mknod.c13
-rw-r--r--ports/linux/guts/mknodat.c13
-rw-r--r--ports/linux/pseudo_wrappers.c11
-rw-r--r--ports/linux/wrapfuncs.in2
-rw-r--r--ports/unix/subports12
-rw-r--r--ports/unix/syncfs/guts/syncfs.c (renamed from ports/unix/guts/syncfs.c)0
-rw-r--r--ports/unix/syncfs/wrapfuncs.in2
-rw-r--r--ports/unix/wrapfuncs.in1
8 files changed, 53 insertions, 1 deletions
diff --git a/ports/linux/guts/mknod.c b/ports/linux/guts/mknod.c
new file mode 100644
index 0000000..eb90e66
--- /dev/null
+++ b/ports/linux/guts/mknod.c
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2016 Wind River Systems; see
+ * guts/COPYRIGHT for information.
+ *
+ * int mknod(const char *path, mode_t mode, dev_t dev)
+ * int rc = -1;
+ */
+
+ rc = wrap___xmknod(_MKNOD_VER, path, mode, &dev);
+
+/* return rc;
+ * }
+ */
diff --git a/ports/linux/guts/mknodat.c b/ports/linux/guts/mknodat.c
new file mode 100644
index 0000000..4956a6a
--- /dev/null
+++ b/ports/linux/guts/mknodat.c
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2016 Wind River Systems; see
+ * guts/COPYRIGHT for information.
+ *
+ * int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev)
+ * int rc = -1;
+ */
+
+ rc = wrap___xmknodat(_MKNOD_VER, dirfd, path, mode, &dev);
+
+/* return rc;
+ * }
+ */
diff --git a/ports/linux/pseudo_wrappers.c b/ports/linux/pseudo_wrappers.c
index 26b29b0..0e9a41f 100644
--- a/ports/linux/pseudo_wrappers.c
+++ b/ports/linux/pseudo_wrappers.c
@@ -31,3 +31,14 @@ int
pseudo_fstat64(int fd, struct stat64 *buf) {
return real___fxstat64(_STAT_VER, fd, buf);
}
+
+/* similar thing happens with mknod */
+int
+pseudo_mknod(const char *path, mode_t mode, dev_t dev) {
+ return real___xmknod(_MKNOD_VER, path, mode, &dev);
+}
+
+int
+pseudo_mknodat(int dirfd, const char *path, mode_t mode, dev_t dev) {
+ return real___xmknodat(_MKNOD_VER, dirfd, path, mode, &dev);
+}
diff --git a/ports/linux/wrapfuncs.in b/ports/linux/wrapfuncs.in
index 3b8955a..c45e01a 100644
--- a/ports/linux/wrapfuncs.in
+++ b/ports/linux/wrapfuncs.in
@@ -7,6 +7,8 @@ int lchown(const char *path, uid_t owner, gid_t group); /* flags=AT_SYMLINK_NOFO
int __fxstatat(int ver, int dirfd, const char *path, struct stat *buf, int flags);
int openat(int dirfd, const char *path, int flags, ...{mode_t mode});
int __openat_2(int dirfd, const char *path, int flags);
+int mknod(const char *path, mode_t mode, dev_t dev); /* real_func=pseudo_mknod */
+int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev); /* real_func=pseudo_mknodat */
int __xmknod(int ver, const char *path, mode_t mode, dev_t *dev); /* flags=AT_SYMLINK_NOFOLLOW */
int __xmknodat(int ver, int dirfd, const char *path, mode_t mode, dev_t *dev); /* flags=AT_SYMLINK_NOFOLLOW */
int fcntl(int fd, int cmd, ...{struct flock *lock});
diff --git a/ports/unix/subports b/ports/unix/subports
new file mode 100644
index 0000000..e41b036
--- /dev/null
+++ b/ports/unix/subports
@@ -0,0 +1,12 @@
+#!/bin/sh
+cat > dummy.c <<EOF
+#include <unistd.h>
+int main(void) {
+ syncfs(0);
+ return 0;
+}
+EOF
+if ${CC} -o dummy dummy.c > /dev/null 2>&1; then
+ echo "unix/syncfs"
+fi
+rm -f dummy.c dummy
diff --git a/ports/unix/guts/syncfs.c b/ports/unix/syncfs/guts/syncfs.c
index 2c9a685..2c9a685 100644
--- a/ports/unix/guts/syncfs.c
+++ b/ports/unix/syncfs/guts/syncfs.c
diff --git a/ports/unix/syncfs/wrapfuncs.in b/ports/unix/syncfs/wrapfuncs.in
new file mode 100644
index 0000000..7b36542
--- /dev/null
+++ b/ports/unix/syncfs/wrapfuncs.in
@@ -0,0 +1,2 @@
+# Added around 2011 to glibc
+int syncfs(int fd); /* async_skip=0 */
diff --git a/ports/unix/wrapfuncs.in b/ports/unix/wrapfuncs.in
index 1245593..2addb27 100644
--- a/ports/unix/wrapfuncs.in
+++ b/ports/unix/wrapfuncs.in
@@ -64,7 +64,6 @@ FILE *popen(const char *command, const char *mode); /* hand_wrapped=1 */
int fsync(int fd); /* async_skip=0 */
int fdatasync(int fd); /* async_skip=0 */
void sync(void); /* async_skip= */
-int syncfs(int fd); /* async_skip=0 */
int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags); /* async_skip=0 */
int msync(void *addr, size_t length, int flags); /* async_skip=0 */
mode_t umask(mode_t mask);