From bc5949a7f4075f6af75be91300d4e32685e572e9 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 14 Sep 2015 17:36:04 +0200 Subject: [PATCH] chunker: add a check whether the POSIX_FADV_DONTNEED constant is defined on openbsd, it isn't. --- borg/_chunker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/borg/_chunker.c b/borg/_chunker.c index b817775b0..5f761c51e 100644 --- a/borg/_chunker.c +++ b/borg/_chunker.c @@ -156,7 +156,7 @@ chunker_fill(Chunker *c) return 0; } length = c->bytes_read - offset; - #if ( _XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L ) + #if ( ( _XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L ) && defined(POSIX_FADV_DONTNEED) ) // We tell the OS that we do not need the data that we just have read any // more (that it maybe has in the cache). This avoids that we spoil the // complete cache with data that we only read once and (due to cache