From: Rich Felker Date: Sat, 31 Aug 2013 20:01:01 +0000 (-0400) Subject: remove incorrect cancellation points from realpath X-Git-Tag: v0.9.14~54 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=35e8621a28db1c34685adbbf1c2229270cbf7236;p=oweals%2Fmusl.git remove incorrect cancellation points from realpath --- 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 -#include #include #include #include #include #include #include +#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; }