summaryrefslogtreecommitdiffstats
path: root/debian/patches/cross.patch
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/patches/cross.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch
new file mode 100644
index 0000000..89155f4
--- /dev/null
+++ b/debian/patches/cross.patch
@@ -0,0 +1,50 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Date: Fri, 06 Sep 2019 21:41:32 +0200
+Subject: [PATCH] cross build fixes
+
+- waf performs sizeof checks by running programs.
+
+--- tevent.orig/buildtools/wafsamba/samba_conftests.py
++++ tevent/buildtools/wafsamba/samba_conftests.py
+@@ -86,9 +86,9 @@ def CHECK_LARGEFILE(conf, define='HAVE_L
+ '''see what we need for largefile support'''
+ getconf_cflags = conf.CHECK_COMMAND(['getconf', 'LFS_CFLAGS'])
+ if getconf_cflags is not False:
+- if (conf.CHECK_CODE('if (sizeof(off_t) < 8) return 1',
++ if (conf.CHECK_CODE('char dummy[(sizeof(off_t) < 8) ? -1 : 1]',
+ define='WORKING_GETCONF_LFS_CFLAGS',
+- execute=True,
++ execute=False,
+ cflags=getconf_cflags,
+ msg='Checking getconf large file support flags work')):
+ conf.ADD_CFLAGS(getconf_cflags)
+@@ -101,23 +101,23 @@ def CHECK_LARGEFILE(conf, define='HAVE_L
+ else:
+ conf.DEFINE(flag_split[0], flag_split[1])
+
+- if conf.CHECK_CODE('if (sizeof(off_t) < 8) return 1',
++ if conf.CHECK_CODE('char dummy[(sizeof(off_t) < 8) ? -1 : 1]',
+ define,
+- execute=True,
++ execute=False,
+ msg='Checking for large file support without additional flags'):
+ return True
+
+- if conf.CHECK_CODE('if (sizeof(off_t) < 8) return 1',
++ if conf.CHECK_CODE('char dummy[(sizeof(off_t) < 8) ? -1 : 1]',
+ define,
+- execute=True,
++ execute=False,
+ cflags='-D_FILE_OFFSET_BITS=64',
+ msg='Checking for -D_FILE_OFFSET_BITS=64'):
+ conf.DEFINE('_FILE_OFFSET_BITS', 64)
+ return True
+
+- if conf.CHECK_CODE('if (sizeof(off_t) < 8) return 1',
++ if conf.CHECK_CODE('char dummy[(sizeof(off_t) < 8) ? -1 : 1]',
+ define,
+- execute=True,
++ execute=False,
+ cflags='-D_LARGE_FILES',
+ msg='Checking for -D_LARGE_FILES'):
+ conf.DEFINE('_LARGE_FILES', 1)