summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-08-31 16:01:01 -0400
committerRich Felker <dalias@aerifal.cx>2013-08-31 16:01:01 -0400
commit35e8621a28db1c34685adbbf1c2229270cbf7236 (patch)
tree5be2c069bae646f2f7b3a05065e6f1d9c1388796 /src
parentdfddd43256f7ad4bad991eeff5cc51772595f327 (diff)
downloadmusl-35e8621a28db1c34685adbbf1c2229270cbf7236.tar.gz
remove incorrect cancellation points from realpath
Diffstat (limited to 'src')
-rw-r--r--src/misc/realpath.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/misc/realpath.c b/src/misc/realpath.c
index 43d40183..4cc7e7de 100644
--- a/src/misc/realpath.c
+++ b/src/misc/realpath.c
@@ -1,11 +1,11 @@
#include <stdlib.h>
-#include <stdio.h>
#include <limits.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
+#include "syscall.h"
void __procfdname(char *, unsigned);
@@ -22,7 +22,7 @@ char *realpath(const char *restrict filename, char *restrict resolved)
return 0;
}
- fd = open(filename, O_PATH|O_NONBLOCK|O_CLOEXEC);
+ fd = syscall(SYS_open, filename, O_PATH|O_NONBLOCK|O_CLOEXEC|O_LARGEFILE);
if (fd < 0) return 0;
__procfdname(buf, fd);
@@ -37,9 +37,9 @@ char *realpath(const char *restrict filename, char *restrict resolved)
goto err;
}
- close(fd);
+ __syscall(SYS_close, fd);
return resolved ? strcpy(resolved, tmp) : strdup(tmp);
err:
- close(fd);
+ __syscall(SYS_close, fd);
return 0;
}