summaryrefslogtreecommitdiff
path: root/lib/replace/wscript
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-01-12 16:08:07 +0100
committerJeremy Allison <jra@samba.org>2013-01-14 21:16:23 +0100
commite0bfb59803184c44cfc354b99ba3d8d7bbfc72b9 (patch)
tree9472551c7fe96fb464d5803701c4fa2337c0e416 /lib/replace/wscript
parentd87ad906df96ac82924ccaf1a127b20c745f1dca (diff)
downloadsamba-e0bfb59803184c44cfc354b99ba3d8d7bbfc72b9.tar.gz
samba-e0bfb59803184c44cfc354b99ba3d8d7bbfc72b9.tar.bz2
samba-e0bfb59803184c44cfc354b99ba3d8d7bbfc72b9.zip
Fix bug 9548: Correctly detect O_DIRECT
Reviewed by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Jan 14 21:16:23 CET 2013 on sn-devel-104
Diffstat (limited to 'lib/replace/wscript')
-rw-r--r--lib/replace/wscript11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 296dae907f..674b99d1f2 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -106,6 +106,17 @@ struct foo bar = { .y = 'X', .x = 1 };
conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h malloc.h')
conf.CHECK_HEADERS('syscall.h sys/syscall.h inttypes.h')
+ conf.CHECK_CODE('''
+ #include <unistd.h>
+ #ifdef HAVE_FCNTL_H
+ #include <fcntl.h>
+ #endif
+ int main(void) { int fd = open("/dev/null", O_DIRECT); }
+ ''',
+ define='HAVE_OPEN_O_DIRECT',
+ addmain=False,
+ msg='Checking for O_DIRECT flag to open(2)')
+
conf.CHECK_TYPES('"long long" intptr_t uintptr_t ptrdiff_t comparison_fn_t')
conf.CHECK_TYPE('_Bool', define='HAVE__Bool')
conf.CHECK_TYPE('bool', define='HAVE_BOOL')