diff options
author | Demin Dmitriy <demindf@gmail.com> | 2019-11-11 03:10:47 +0300 |
---|---|---|
committer | Demin Dmitriy <demindf@gmail.com> | 2019-11-12 04:29:11 +0300 |
commit | b6e37c31460c44560644c366b60f1ffe64300dde (patch) | |
tree | 8e79895d7ec4ea5eca4832ed3277b676bfe0128b | |
parent | 6432f92e42d902524f1c134ece279494d97d29c8 (diff) | |
download | nixlib-b6e37c31460c44560644c366b60f1ffe64300dde.tar nixlib-b6e37c31460c44560644c366b60f1ffe64300dde.tar.gz nixlib-b6e37c31460c44560644c366b60f1ffe64300dde.tar.bz2 nixlib-b6e37c31460c44560644c366b60f1ffe64300dde.tar.lz nixlib-b6e37c31460c44560644c366b60f1ffe64300dde.tar.xz nixlib-b6e37c31460c44560644c366b60f1ffe64300dde.tar.zst nixlib-b6e37c31460c44560644c366b60f1ffe64300dde.zip |
libredirect: fix `access` return type
`access` should return `int` not `int*`. Actually compiler produced identical assembly with any of those types, so by luck it "just worked".
-rw-r--r-- | pkgs/build-support/libredirect/libredirect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/build-support/libredirect/libredirect.c b/pkgs/build-support/libredirect/libredirect.c index 3a8b4b9d509f..d31b7551e949 100644 --- a/pkgs/build-support/libredirect/libredirect.c +++ b/pkgs/build-support/libredirect/libredirect.c @@ -145,9 +145,9 @@ int stat(const char * path, struct stat * st) return __stat_real(rewrite(path, buf), st); } -int * access(const char * path, int mode) +int access(const char * path, int mode) { - int * (*access_real) (const char *, int mode) = dlsym(RTLD_NEXT, "access"); + int (*access_real) (const char *, int mode) = dlsym(RTLD_NEXT, "access"); char buf[PATH_MAX]; return access_real(rewrite(path, buf), mode); } |