Opened 14 years ago

Closed 14 years ago

Last modified 9 years ago

#220 closed defect (fixed)

Compile errors on Solaris 10 with --enable-logfile-monitor

Reported by: rainer Owned by: rainer
Priority: major Milestone: 2.8.0
Component: main Version:
Keywords: Cc:

Description

As reported by A. Saheba, the logfile monitoring code doesn't compile on Solaris 10:

gcc  -DHAVE_CONFIG_H -I. -I./include  -I/usr/local/pcre/include -O2 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -pthreads -DUSE_MALLOC_LOCK=1 -fPIE -Wall -W  -fno-strength-reduce -fno-omit-frame-pointer  -DSH_WITH_CLIENT -o sh_log_parse_syslog.o -c x_sh_log_parse_syslog.c
In file included from /usr/include/sys/vnode.h:45,
                 from /usr/include/sys/stream.h:22,
                 from /usr/include/netinet/in.h:66,
                 from /usr/include/sys/socket.h:45,
                 from ./include/sh_calls.h:27,
                 from ./include/samhain.h:318,
                 from x_sh_log_parse_syslog.c:27:
/usr/include/sys/resource.h:146: error: field `ru_utime' has incomplete type
/usr/include/sys/resource.h:147: error: field `ru_stime' has incomplete type

It turns out that it's neccessary to have #define __EXTENSIONS__ in order to get the definition of 'struct timeval' (which is the type of ru_utime and ru_stime).

Furthermore, Solaris 10 doesn't define ACORE and AXSIG in <sys/acct.h>:

gcc  -DHAVE_CONFIG_H -I. -I./include  -I/usr/local/pcre/include -O2 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -pthreads -DUSE_MALLOC_LOCK=1 -fPIE -Wall -W  -fno-strength-reduce -fno-omit-frame-pointer  -DSH_WITH_CLIENT -o sh_log_parse_pacct.o -c x_sh_log_parse_pacct.c
x_sh_log_parse_pacct.c: In function `expand_flags':
x_sh_log_parse_pacct.c:118: error: `ACORE' undeclared (first use in this function)
x_sh_log_parse_pacct.c:118: error: (Each undeclared identifier is reported only once
x_sh_log_parse_pacct.c:118: error: for each function it appears in.)
x_sh_log_parse_pacct.c:119: error: `AXSIG' undeclared (first use in this function)

Change History (1)

comment:1 by rainer, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in changeset [292].

Note: See TracTickets for help on using tickets.