From 45c5db5475d2aa0a73675f3a5129523f82adfc18 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Thu, 11 Aug 2005 15:48:10 +0000 Subject: fix --- example/fusexmp_fh.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'example') 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 -#ifdef linux -/* For pread()/pwrite() */ -#define _XOPEN_SOURCE 500 -#endif +#define _GNU_SOURCE #include #include @@ -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; } -- cgit v1.2.3