From 294069b36bce29e484a446222229cb870b0e763a Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 22 Apr 2005 13:17:07 +0000 Subject: [PATCH] Don't use O_DIRECTORY on non-Linux systems. (It's not necessary, but it adds an extra check.) --- lib/sync.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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); -- 2.39.2