diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-10-08 11:15:50 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-10-19 12:14:59 +0200 |
commit | 92d53dd7dc8ca71ae28d2a8762524396cd3c6f58 (patch) | |
tree | e6fa4de8788d0d3aed45cdf9899763ceb28ebe76 /source3/wscript | |
parent | e24b1041b1f6e5b1c5a258a2cbe058f134a45ed9 (diff) | |
download | samba-92d53dd7dc8ca71ae28d2a8762524396cd3c6f58.tar.gz samba-92d53dd7dc8ca71ae28d2a8762524396cd3c6f58.tar.bz2 samba-92d53dd7dc8ca71ae28d2a8762524396cd3c6f58.zip |
s3:configure: check that struct utmp.ut_line is large enough for our use case
We use "smb/%u" with a 32-bit number, "smb/4294967295\0" requires
15 chars (including the '\0').
metze
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/wscript')
-rw-r--r-- | source3/wscript | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/wscript b/source3/wscript index 56ab760750..92575c8264 100644 --- a/source3/wscript +++ b/source3/wscript @@ -660,8 +660,16 @@ msg.msg_acctrightslen = sizeof(fd); conf.CHECK_CODE('struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);', 'PUTUTLINE_RETURNS_UTMP', headers='utmp.h', msg="Checking whether pututline returns pointer") + conf.CHECK_SIZEOF(['((struct utmp *)NULL)->ut_line'], headers='utmp.h', + define='SIZEOF_UTMP_UT_LINE') + if not conf.CONFIG_SET('SIZEOF_UTMP_UT_LINE'): + conf.env.with_utmp = False + elif int(conf.env.SIZEOF_UTMP_UT_LINE) < 15: + conf.env.with_utmp = False if conf.env.with_utmp: conf.DEFINE('WITH_UTMP', 1) + else: + Logs.warn("--with-utmp but utmp support not sufficient") if Options.options.with_avahi: conf.env.with_avahi = True |