fix build on systems with utmpx.h

This commit is contained in:
Radim Kolar 2014-09-07 07:35:41 +02:00
parent 6d863fc99f
commit ba56dcfe88
3 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,7 @@ Version NEXT
note default timeout values in fsp_env man page note default timeout values in fsp_env man page
setting environment value FSP_TIMEOUT to <=0 uses 4byte maxint value setting environment value FSP_TIMEOUT to <=0 uses 4byte maxint value
note default fspd max packet size in fsp_env man page note default fspd max packet size in fsp_env man page
fix build on systems with utmpx.h API (FreeBSD 9)
Version 2.8.1b26 - 1 Oct 2009 Version 2.8.1b26 - 1 Oct 2009
fver now reports if server can process extra data in input packets. fver now reports if server can process extra data in input packets.

View File

@ -119,6 +119,8 @@ if conf.CheckCHeader('sys/wait.h'):
conf.env.Append(CPPFLAGS = '-DHAVE_SYS_WAIT_H') conf.env.Append(CPPFLAGS = '-DHAVE_SYS_WAIT_H')
if conf.CheckCHeader('utime.h'): if conf.CheckCHeader('utime.h'):
conf.env.Append(CPPFLAGS = '-DHAVE_UTIME_H') conf.env.Append(CPPFLAGS = '-DHAVE_UTIME_H')
if conf.CheckCHeader('utmpx.h'):
conf.env.Append(CPPFLAGS = '-DHAVE_UTMPX_H')
if not conf.CheckType("union semun", "#include <sys/types.h>\n#include <sys/ipc.h>\n#include <sys/sem.h>",'c'): if not conf.CheckType("union semun", "#include <sys/types.h>\n#include <sys/ipc.h>\n#include <sys/sem.h>",'c'):
conf.env.Append(CPPFLAGS = "-D_SEM_SEMUN_UNDEFINED=1") conf.env.Append(CPPFLAGS = "-D_SEM_SEMUN_UNDEFINED=1")
enableLargeFiles(conf) enableLargeFiles(conf)

View File

@ -32,7 +32,11 @@
#include <sys/param.h> #include <sys/param.h>
#include <grp.h> #include <grp.h>
#include <pwd.h> #include <pwd.h>
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#else
#include <utmp.h> #include <utmp.h>
#endif
#ifdef TIME_WITH_SYS_TIME #ifdef TIME_WITH_SYS_TIME
# include <sys/time.h> # include <sys/time.h>
# include <time.h> # include <time.h>