summarylogtreecommitdiffstats
path: root/0002-Remove-macro.patch
blob: 594c776809786afb63dc9c623103cf9987cbfe60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/prov/util/src/util_mem_hooks.c
+++ b/prov/util/src/util_mem_hooks.c
@@ -568,14 +568,17 @@
 
 static int ofi_intercept_madvise(void *addr, size_t length, int advice)
 {
-	if (advice == MADV_DONTNEED ||
+	if (
+#ifdef POSIX_MADV_DONTNEED
+            advice == POSIX_MADV_DONTNEED ||
+#endif
 #ifdef MADV_FREE
 	    advice == MADV_FREE ||
 #endif
 #ifdef MADV_REMOVE
 	    advice == MADV_REMOVE ||
 #endif
-	    advice == POSIX_MADV_DONTNEED) {
+	    advice == MADV_DONTNEED) {
 		ofi_intercept_handler(addr, length);
 	}