[syslog-ng]Compiling syslog-ng-1.9.3 on OpenBSD 3.6?

todd glassey syslog-ng@lists.balabit.hu
Sat, 12 Feb 2005 14:50:42 -0800


Balazs ever think of merging a NTP client into SysLog-NG so the application
itself coulf generate better timestamps from remote nodes?

T.
----- Original Message ----- 
From: "Balazs Scheidler" <bazsi@balabit.hu>
To: <syslog-ng@lists.balabit.hu>
Sent: Saturday, February 12, 2005 2:25 PM
Subject: Re: [syslog-ng]Compiling syslog-ng-1.9.3 on OpenBSD 3.6?


> As you know syslog-ng 1.9.3 is a reimplementation, and as until now I
> focused on functionality and features, relatively little care has been
> taken to make the code cleanly compile on all platforms out of the box.
>
> Anyway, reports like this are greatly appreciated, and I'm fixing
> problems that you encounter. Please find my answers inline:
>
> On Fri, 2005-02-11 at 20:48 -0600, Kevin wrote:
> > I encounter a strange error related to the variable 'timezone' when
attempting
> > to compile syslog-ng-1.9.3 on OpenBSD 3.6.  Suggestions appreciated.
> >
> > First problem I found was easily addressed:
> >     main.c
> >     main.c:39: wait.h: No such file or directory
> >
> > Replacing line 39 (#include <wait.h>) with these three lines solved that
issue:
> >     #include <sys/time.h>
> >     #include <sys/resource.h>
> >     #include <sys/wait.h>
>
> Looking at the manpage for waitpid() its synopsis tells me to include
> <sys/types.h> and <sys/wait.h>, I added those. I can't see why you need
> sys/time.h and sys/resource.h Are there other error messages as well?
>
> >
> > After resolving that issue, I encounter the following:
> >     echo './'`logmsg.c
> >     logmsg.c: In function `log_stamp_format':
> >     logmsg.c:68: warning: assignment makes integer from pointer without
a cast
> >     logmsg.c: In function `log_msg_parse':
> >     logmsg.c:234: warning: assignment makes integer from pointer without
a cast
> >     logmsg.c:237: invalid operands to binary -
> >     logmsg.c:265: warning: assignment makes integer from pointer without
a cast
> >     logmsg.c: In function `log_msg_init':
> >     logmsg.c:470: warning: assignment makes integer from pointer without
a cast
> >     *** Error code 1
> >
> > These lines are as follows:
> >      68: target_zone_offset = timezone;
> >     234: self->stamp.zone_offset = timezone; /* assume local timezone */
> >     237: self->stamp.time.tv_sec = mktime(&tm) - timezone +
> > self->stamp.zone_offset;
> >     265: self->stamp.zone_offset = timezone; /* assume local timezone */
> >     470: self->recvd.zone_offset = timezone;
> >
> > In OpenBSD, timezone is a function, char *timezone(int, int), not a
variable.
> > it appears that older versions of syslog-ng included options in
configure for
> > "checking for global timezone variable", but not in 1.9.3?
>
> Hmm. syslog-ng 1.6.x used timezone only for formatting the zone offset
> in syslog messages, however 1.9.x has complete timezone support
> (timezone can be specified in incoming messages, on a per-source and on
> the global basis) So I definitely need the current timezone offset,
> relative to GMT, calculated in seconds, just as the global variable
> 'timezone' contains this on for example Linux and a couple of other
> platforms.
>
> This variable is part of SUS, if I understand correctly. Can you help me
> what to use on OpenBSD instead?
>
> (the timezone function is not good)
>
> -- 
> Bazsi
>
>
> _______________________________________________
> syslog-ng maillist  -  syslog-ng@lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
>