aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.txt2
-rw-r--r--ports/linux/guts/renameat2.c20
-rw-r--r--ports/linux/wrapfuncs.in1
3 files changed, 23 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 168709e..f79c2d1 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,5 +1,7 @@
2019-04-09:
* (seebs) Partial fix for db corruption issue.
+ * (seebs) Make a glibc renameat2 wrapper that just fails because
+ implementing renameat2 semantics is Surprisingly Hard.
2018-12-15:
* (seebs) Import IPC patch from Rasmus Villemoes.
diff --git a/ports/linux/guts/renameat2.c b/ports/linux/guts/renameat2.c
new file mode 100644
index 0000000..0df8369
--- /dev/null
+++ b/ports/linux/guts/renameat2.c
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2019 Peter Seebach/Seebs <seebs@seebs.net>; see
+ * guts/COPYRIGHT for information.
+ *
+ * [Note: copyright added by code generator, may be
+ * incorrect. Remove this if you fix it.]
+ *
+ * int renameat2(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, unsigned int flags)
+ * int rc = -1;
+ */
+
+ /* for now, let's try just failing out hard, and hope things retry with a
+ * different syscall.
+ */
+ errno = ENOSYS;
+ rc = -1;
+
+/* return rc;
+ * }
+ */
diff --git a/ports/linux/wrapfuncs.in b/ports/linux/wrapfuncs.in
index e47acc3..a129eba 100644
--- a/ports/linux/wrapfuncs.in
+++ b/ports/linux/wrapfuncs.in
@@ -55,3 +55,4 @@ int getpwent_r(struct passwd *pwbuf, char *buf, size_t buflen, struct passwd **p
int getgrent_r(struct group *gbuf, char *buf, size_t buflen, struct group **gbufp);
int capset(cap_user_header_t hdrp, const cap_user_data_t datap); /* real_func=pseudo_capset */
long syscall(long nr, ...); /* hand_wrapped=1 */
+int renameat2(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, unsigned int flags); /* flags=AT_SYMLINK_NOFOLLOW */