[syslog-ng]replacing part of prog name with hostname

Nate Campi nate@campin.net
Mon, 6 Jan 2003 16:03:25 -0800


On Mon, Jan 06, 2003 at 07:00:28PM +0100, Balazs Scheidler wrote:
> On Mon, Jan 06, 2003 at 09:13:24AM -0800, Nate Campi wrote:
> > On solaris 2.6 (I build on solaris 2.6 since that's the lowest version I
> > run and therefore binaries built on it tend to work on later versions) I
> > get this after applying the patch:
> > 
> >  libol-0.3.6/src -D_GNU_SOURCE -c affile.c
> >  affile.c: In function `do_init_affile_source':
> >  affile.c:165: structure has no member named `bad_hostname'
> >  affile.c:165: too many arguments to function `make_log_reader'
> >  make[3]: *** [affile.o] Error 1
> >  make[3]: Leaving directory `/usr/share/src/syslog-ng-1.5.24/src'
> >  make[2]: *** [all-recursive] Error 1
> >  make[2]: Leaving directory `/usr/share/src/syslog-ng-1.5.24/src'
> >  make[1]: *** [all-recursive-am] Error 2
> >  make[1]: Leaving directory `/usr/share/src/syslog-ng-1.5.24/src'
> >  make: *** [all-recursive] Error 1
> > 
> > syslog-ng 1.5.24 and libol 0.3.6, gcc version 2.95. Any ideas?
> 
> this time you need to regenerate .x files as I have changed class
> definitions in my patch. I can also send you a patched .tar.gz in private if
> you want.

I installed scsh on this host, and it gets further, but doesn't compile.

 make[1]: Entering directory `/usr/share/src/syslog-ng-1.5.24/src'
 make  all-recursive
 make[2]: Entering directory `/usr/share/src/syslog-ng-1.5.24/src'
 Making all in .
 make[3]: Entering directory `/usr/share/src/syslog-ng-1.5.24/src'
 gcc -DHAVE_CONFIG_H -I. -I/usr/share/src/syslog-ng-1.5.24/src -I.     -g
 -O2 -Wall -I/usr/share/src/libol-0.3.6/src -D_GNU_SOURCE -c afstreams.c
 afstreams.c: In function `io_stream_get':
 afstreams.c:175: `self' undeclared (first use in this function)
 afstreams.c:175: (Each undeclared identifier is reported only once
 afstreams.c:175: for each function it appears in.)
 make[3]: *** [afstreams.o] Error 1
 make[3]: Leaving directory `/usr/share/src/syslog-ng-1.5.24/src'
 make[2]: *** [all-recursive] Error 1
 make[2]: Leaving directory `/usr/share/src/syslog-ng-1.5.24/src'
 make[1]: *** [all-recursive-am] Error 2
 make[1]: Leaving directory `/usr/share/src/syslog-ng-1.5.24/src'
 make: *** [all-recursive] Error 1

The offending line is "regcomp(&self->bad_hostname, "^$", REG_NOSUB |
REG_EXTENDED);" in this exerpt:

  {
         NEW(stream_fd, f);
 
         init_file(backend, &f->super, fd, NULL);
         f->super.prepare = prepare_stream_fd;
         f->super.read = stream_read_callback;
         f->super.want_read = 1;
         f->pipe = pipe;
         if (hostname_re == NULL)
                 regcomp(&self->bad_hostname, "^$", REG_NOSUB | REG_EXTENDED);
         else
                 regcomp(&self->bad_hostname, hostname_re, REG_NOSUB | REG_EXTENDED);
 
         return &f->super;
 }
 

What should I do now?

TIA
-- 
Nate Campi   http://www.campin.net 

ignorami: n: 
The BOFH art of folding problem lusers into representational shapes.