summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-10 10:02:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:08 -0500
commitd2e72c46c116bffc662024408f1391bda57b9849 (patch)
tree100b86f3c6af80d0af9c02425cbf03e1b01c7353 /source4/script
parent9adf2883efc275b359d8e50c493023c48883eef6 (diff)
downloadsamba-d2e72c46c116bffc662024408f1391bda57b9849.tar.gz
samba-d2e72c46c116bffc662024408f1391bda57b9849.tar.bz2
samba-d2e72c46c116bffc662024408f1391bda57b9849.zip
r18322: fixed a compilation problem on AIX caused by lex not putting config.h
first. That leads to a conflicting define for lseek() due to _LARGE_FILES being defined after standards headers are included (This used to be commit 9034238e27f22a7077df9fa0d7c83cce4503aabc)
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/lex_compile.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/script/lex_compile.sh b/source4/script/lex_compile.sh
index f33a7f0fba..064bf89bea 100755
--- a/source4/script/lex_compile.sh
+++ b/source4/script/lex_compile.sh
@@ -19,7 +19,9 @@ fi
TOP=`pwd`
if cd $dir && $LEX $file; then
if [ -r $base.yy.c ];then
- sed '/^#/ s|$base.yy\.c|$DEST|' $base.yy.c > $base.c
+ # we must guarantee that config.h comes first
+ echo "#include \"config.h\"" > $base.c
+ sed '/^#/ s|$base.yy\.c|$DEST|' $base.yy.c >> $base.c
rm -f $base.yy.c
fi
fi