aboutsummaryrefslogtreecommitdiff
path: root/wiki.c
diff options
context:
space:
mode:
authorthe little girl <yui@blekksprut.net>2014-02-21 17:33:12 +0100
committerthe little girl <yui@blekksprut.net>2014-02-21 17:33:12 +0100
commitbc199a9c3100b48d8109a010006655bf8ea1895b (patch)
tree2cf0d678a53feb0fd0712270941e11bcf150f0bb /wiki.c
parent827c442ab3586e6019b97714ca0b925a4625a361 (diff)
downloadukulele-bc199a9c3100b48d8109a010006655bf8ea1895b.tar.xz
access -> eaccess
Diffstat (limited to 'wiki.c')
-rw-r--r--wiki.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/wiki.c b/wiki.c
index d8fd11c..cfb085e 100644
--- a/wiki.c
+++ b/wiki.c
@@ -1,4 +1,5 @@
#define _POSIX_C_SOURCE 200809L
+#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
@@ -20,14 +21,14 @@ int writable(char *path) {
struct stat s;
if(!stat(path, &s)) {
if(S_ISREG(s.st_mode))
- return !access(path, W_OK);
+ return !eaccess(path, W_OK);
else if(S_ISDIR(s.st_mode))
return 0;
}
char *dir = dirname(strdup(path));
if(!stat(dir, &s)) {
if(S_ISDIR(s.st_mode))
- return !access(dir, W_OK);
+ return !eaccess(dir, W_OK);
}
return 0;
}