X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Fsync.c;h=1b3a0d1571f5f043aa246ac89a2efb2f0af85991;hb=8ab69f51fccccbcae521bd7f7e3ae27146fd1217;hp=8877e31072dc4582840703349a961bf0e6707ff0;hpb=cad27e97e6370f96903d42aaf345c099af0a03bd;p=libucw.git diff --git a/lib/sync.c b/lib/sync.c index 8877e310..1b3a0d15 100644 --- a/lib/sync.c +++ b/lib/sync.c @@ -1,7 +1,7 @@ /* * UCW Library -- Syncing Directories * - * (c) 2004 Martin Mares + * (c) 2004--2005 Martin Mares */ #include "lib/lib.h" @@ -12,7 +12,11 @@ void sync_dir(byte *name) { - int fd = open(name, O_RDONLY | O_DIRECTORY); + int fd = open(name, O_RDONLY +#ifdef CONFIG_LINUX + | O_DIRECTORY +#endif +); if (fd < 0) goto err; int err = fsync(fd);