src/server/daemon/vfs.c

changeset 97
09fbefc0e6a9
parent 92
382bff43c6eb
child 105
63d9051fe35c
equal deleted inserted replaced
96:0185b13bf41f 97:09fbefc0e6a9
303 } 303 }
304 304
305 // open directory 305 // open directory
306 #ifdef BSD 306 #ifdef BSD
307 DIR *sys_dir = opendir(path); 307 DIR *sys_dir = opendir(path);
308 if(sys_dir) { 308 int dir_fd = sys_dir ? dirfd(sys_dir) : 0;
309 int dir_fd = dirfd(sys_dir);
310 }
311 #else 309 #else
312 int dir_fd = open(path, O_RDONLY); 310 int dir_fd = open(path, O_RDONLY);
313 if(dir_fd == -1) { 311 if(dir_fd == -1) {
314 if(ctx) { 312 if(ctx) {
315 ctx->vfs_errno = errno; 313 ctx->vfs_errno = errno;

mercurial