summaryrefslogtreecommitdiff
path: root/os-posix.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-10 10:40:10 -0500
committerpommicket <pommicket@gmail.com>2023-01-10 10:40:10 -0500
commitb0fe15647d196081d801db574fa074ff77e46f5f (patch)
tree786d4b15493ab469811fc7cd139f5d664f414644 /os-posix.c
parentedd5188dfba93b8ffe376d0c194804f35f43dcaa (diff)
linux build , etc.
Diffstat (limited to 'os-posix.c')
-rw-r--r--os-posix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/os-posix.c b/os-posix.c
index 38e21cf..ca950b1 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -116,6 +116,10 @@ int os_get_cwd(char *buf, size_t buflen) {
}
}
+int os_rename_overwrite(const char *oldname, const char *newname) {
+ return rename(oldname, newname) == 0 ? 0 : -1;
+}
+
struct timespec time_last_modified(const char *filename) {
struct stat statbuf = {0};
stat(filename, &statbuf);