off_t needs #include <sys/types.h> on BSD systems
This commit is contained in:
parent
40c577972b
commit
8911f4aff5
|
|
@ -1,8 +1,8 @@
|
||||||
#
|
#
|
||||||
# SCons Largefile enablement
|
# SCons Largefile enablement
|
||||||
#
|
#
|
||||||
# Version 1.0
|
# Version 1.1
|
||||||
# 21-Sep-2009
|
# 01-Oct-2009
|
||||||
#
|
#
|
||||||
|
|
||||||
def enableLargeFiles(conf):
|
def enableLargeFiles(conf):
|
||||||
|
|
@ -10,11 +10,11 @@ def enableLargeFiles(conf):
|
||||||
fseeko=conf.CheckFunc('fseeko')
|
fseeko=conf.CheckFunc('fseeko')
|
||||||
if fseeko:
|
if fseeko:
|
||||||
conf.env.Append(CPPFLAGS = '-DHAVE_FSEEKO')
|
conf.env.Append(CPPFLAGS = '-DHAVE_FSEEKO')
|
||||||
offt=conf.CheckTypeSize('off_t','#include <stdio.h>')
|
offt=conf.CheckTypeSize('off_t','#include <stdio.h>\n#include <sys/types.h>')
|
||||||
if offt<8 and offt>0:
|
if offt<8 and offt>0:
|
||||||
flags=conf.env.Dictionary()['CPPFLAGS']
|
flags=conf.env.Dictionary()['CPPFLAGS']
|
||||||
conf.env.Append(CPPFLAGS='-D_FILE_OFFSET_BITS=64')
|
conf.env.Append(CPPFLAGS='-D_FILE_OFFSET_BITS=64')
|
||||||
offt=conf.CheckTypeSize('off_t','#include <stdio.h>')
|
offt=conf.CheckTypeSize('off_t','#include <stdio.h>\n#include <sys/types.h>')
|
||||||
if offt < 8:
|
if offt < 8:
|
||||||
env.Replace(CPPFLAGS=flags)
|
env.Replace(CPPFLAGS=flags)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user