summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2010-03-21 12:53:44 +0100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:03 +1000
commit23ba9ad6e20f751e7d68f24f8d2dca7cb1c7e335 (patch)
tree4059bd9b6d6fdec4e2675667ad5346e85586ad22 /source3
parent207869dbf44f23fd3b1576e248851b88d333a6fa (diff)
downloadsamba-23ba9ad6e20f751e7d68f24f8d2dca7cb1c7e335.tar.gz
samba-23ba9ad6e20f751e7d68f24f8d2dca7cb1c7e335.tar.bz2
samba-23ba9ad6e20f751e7d68f24f8d2dca7cb1c7e335.zip
build: Check for Linux kernel oplocks
Diffstat (limited to 'source3')
-rw-r--r--source3/wscript13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/wscript b/source3/wscript
index f0d85326c6..589f1b4da2 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -58,6 +58,19 @@ main() {
}''', 'HAVE_KERNEL_CHANGE_NOTIFY', addmain=False, execute=True,
msg="Checking for kernel change notify support")
+ # Check for Linux kernel oplocks
+ conf.CHECK_CODE('''
+#include <sys/types.h>
+#include <fcntl.h>
+#include <signal.h>
+#ifndef F_NOTIFY
+#define F_NOTIFY 1026
+#endif
+main() {
+ exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ? 1 : 0);
+}''', 'HAVE_KERNEL_OPLOCKS_LINUX', addmain=False, execute=True,
+ msg="Checking for Linux kernel oplocks")
+
# Look for CUPS
conf.find_program('cups-config', var='CUPS_CONFIG')
if conf.env.CUPS_CONFIG: