summaryrefslogtreecommitdiff
path: root/source3/wscript
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-31 15:38:55 -0700
committerJeremy Allison <jra@samba.org>2011-06-01 02:54:51 +0200
commit5abab13851ff2fc3a5792d08cc753c9b479c8cc1 (patch)
tree1d95946ea5f63a4d419b834c7ca15d09e550fa6d /source3/wscript
parent313bb1fb9c87084084439c6b45e4c01e82e3f9ec (diff)
downloadsamba-5abab13851ff2fc3a5792d08cc753c9b479c8cc1.tar.gz
samba-5abab13851ff2fc3a5792d08cc753c9b479c8cc1.tar.bz2
samba-5abab13851ff2fc3a5792d08cc753c9b479c8cc1.zip
Add check for the getcwd function being able to take NULL,0 arguments.
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/wscript b/source3/wscript
index ee4a98c85d..83b0a0ef04 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1420,6 +1420,16 @@ main() {
conf.DEFINE('AIX_SENDFILE_API', '1')
conf.DEFINE('WITH_SENDFILE', '1')
+ # Check for getcwd allowing a NULL arg.
+ conf.CHECK_CODE('''
+#include <unistd.h>
+main() {
+ char *s = getcwd(NULL,0);
+ exit(s != NULL ? 0 : 1);
+}''', 'GETCWD_TAKES_NULL', addmain=False, execute=True,
+ msg="getcwd takes a NULL argument")
+
+
conf.CHECK_CODE('''enum TDB_ERROR err = TDB_ERR_NESTING''',
'HAVE_TDB_ERR_NESTING',
headers='tdb.h',