s3/wscript: fix Linux kernel oplock detection
authorRalph Boehme <slow@samba.org>
Mon, 6 Mar 2017 11:09:53 +0000 (12:09 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 10 Mar 2017 02:28:25 +0000 (03:28 +0100)
Fix a copy/paste error, the Linux kernel oplocks check was copied from
the change notify support check.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=7537

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/wscript

index 2ea1db2c9cc60d6dfa112a41160f17b4f9c102c5..78753687431af9df1974392c0dc7fd997b76d790 100644 (file)
@@ -160,11 +160,11 @@ main() {
 #include <sys/types.h>
 #include <fcntl.h>
 #include <signal.h>
-#ifndef F_NOTIFY
-#define F_NOTIFY 1026
+#ifndef F_GETLEASE
+#define F_GETLEASE 1025
 #endif
 main() {
-        exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
+        exit(fcntl(open("/tmp", O_RDONLY), F_GETLEASE, 0) == -1 ?  1 : 0);
 }''', 'HAVE_KERNEL_OPLOCKS_LINUX', addmain=False, execute=True,
         msg="Checking for Linux kernel oplocks")