aboutsummaryrefslogtreecommitdiff
path: root/lib/xwrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xwrap.c')
-rw-r--r--lib/xwrap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c
index 2027069d..b2416a4e 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -378,6 +378,11 @@ int notstdio(int fd)
return fd;
}
+void xrename(char *from, char *to)
+{
+ if (rename(from, to)) perror_exit("rename %s -> %s", from, to);
+}
+
int xtempfile(char *name, char **tempname)
{
int fd;