summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/syscalls.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-12-11 13:40:16 +0100
committerAdam Borowski <kilobyte@angband.pl>2010-12-11 13:40:16 +0100
commitbc5940ade8b76a1c364baef74898479e9d0786a6 (patch)
tree30a85f7282c569d88fb97c694cfdc97b03532e50 /crawl-ref/source/syscalls.h
parent98a2775efda1590026bb8196dfe20f2d53404e31 (diff)
downloadcrawl-ref-bc5940ade8b76a1c364baef74898479e9d0786a6.tar.gz
crawl-ref-bc5940ade8b76a1c364baef74898479e9d0786a6.zip
Cowardly assume that systems lack fdatasync() unless on a list.
It's strange that FreeBSD and old MacOS X don't have something that was mandated in POSIX Issue 5 (1997), but let's cope with that. It's better to unfairly accuse other systems of noncompliance and suffer a slowdown than to fail to build at all.
Diffstat (limited to 'crawl-ref/source/syscalls.h')
-rw-r--r--crawl-ref/source/syscalls.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/syscalls.h b/crawl-ref/source/syscalls.h
index 6f13f9b663..4e9e81778d 100644
--- a/crawl-ref/source/syscalls.h
+++ b/crawl-ref/source/syscalls.h
@@ -25,7 +25,9 @@ int fdatasync(int fd);
# endif
#endif
-#ifdef TARGET_OS_MACOSX
+// This check is way underinclusive.
+#if !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_WINDOWS) && !defined(TARGET_OS_NETBSD) && !defined(TARGET_OS_SOLARIS)
+# define NEED_FAKE_FDATASYNC
int fdatasync(int fd);
#endif