aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <miklos@szeredi.hu>2005-08-11 15:48:10 +0000
committerGravatar Miklos Szeredi <miklos@szeredi.hu>2005-08-11 15:48:10 +0000
commit45c5db5475d2aa0a73675f3a5129523f82adfc18 (patch)
tree979361270e8e77a74ccc9c13db50b8c96a7b6de9 /example
parent17c2471741a89bd58934faf12f7f9b8b3e85af27 (diff)
fix
Diffstat (limited to 'example')
-rw-r--r--example/fusexmp_fh.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/example/fusexmp_fh.c b/example/fusexmp_fh.c
index 8a40c9e..432ff6f 100644
--- a/example/fusexmp_fh.c
+++ b/example/fusexmp_fh.c
@@ -8,10 +8,7 @@
#include <config.h>
-#ifdef linux
-/* For pread()/pwrite() */
-#define _XOPEN_SOURCE 500
-#endif
+#define _GNU_SOURCE
#include <fuse.h>
#include <stdio.h>
@@ -210,13 +207,13 @@ static int xmp_utime(const char *path, struct utimbuf *buf)
static int xmp_open(const char *path, struct fuse_file_info *fi)
{
- int res;
+ int fd;
- res = open(path, fi->flags);
- if(res == -1)
+ fd = open(path, fi->flags);
+ if(fd == -1)
return -errno;
- fi->fh = res;
+ fi->fh = fd;
return 0;
}