On Fri, Jul 13, 2001 at 11:25:10PM +0200, Sander wrote:
I'm trying to compile syslog-ng 1.4.12 using gcc-2.95.3 and receive this error:
gcc -DHAVE_CONFIG_H -I. -I/v/src/syslog-ng-1.4.12/src -I. -O2 -Wall -I/usr/local/include/libol -D_GNU_SOURCE -c afstreams.c afstreams.c: In function `io_stream_get': afstreams.c:167: too few arguments to function `init_file' *** Error code 1 make: Fatal error: Command failed for target `afstreams.o' Current working directory /v/src/syslog-ng-1.4.12/src *** Error code 1 make: Fatal error: Command failed for target `all-recursive'
try this patch: diff -u -r1.10.2.1 afstreams.c --- afstreams.c 2001/02/25 12:30:22 1.10.2.1 +++ afstreams.c 2001/07/16 08:26:55 @@ -164,7 +164,7 @@ { NEW(stream_fd, f); - init_file(backend, &f->super, fd); + init_file(backend, &f->super, fd, NULL); f->super.prepare = prepare_stream_fd; f->super.read = stream_read_callback; f->super.want_read = 1;
P.S.: Another minor point (just a warning), gcc also complains about this: gcc -DHAVE_CONFIG_H -I. -I/v/src/syslog-ng-1.4.12/src -I. -O2 -Wall -I/usr/local/include/libol -D_GNU_SOURCE -c log.c log.c: In function `parse_log_msg': log.c:58: warning: subscript has type `char'
as it seems the isdigit() implementation uses an array to decide whether a character is digit or not. The problem might be if character is above 127, in which case the array is indexed with a negative value. Try this patch: diff -u -r1.19.4.3 log.c --- log.c 2001/06/11 07:44:55 1.19.4.3 +++ log.c 2001/07/16 08:28:02 @@ -40,7 +40,7 @@ static void parse_log_msg(struct log_info *lm, UINT32 length, UINT8 *data) { - char *src; + unsigned char *src; int left; int pri; time_t now = time(NULL); -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1