Package: syslog-ng Version: 3.3.1.dfsg-1 Severity: important Tags: patch User: debian-h...@lists.debian.org Usertags: hurd
Hi, The attached patch fixes the FTBFS problems of syslog-ng on GNU/Hurd. Since IOV_MAX is not defined on Hurd its usage is made conditional. Errors are handled by g_malloc0() which aborts on failure, so no return value has to be checked. Thanks!
diff -ur syslog-ng-3.3.1.dfsg/lib/logproto.c syslog-ng-3.3.1.dfsg.new/lib/logproto.c --- syslog-ng-3.3.1.dfsg/lib/logproto.c 2011-11-16 17:26:29.000000000 +0100 +++ syslog-ng-3.3.1.dfsg.new/lib/logproto.c 2011-11-16 17:32:06.000000000 +0100 @@ -420,9 +420,11 @@ if (flush_lines == 0) /* the flush-lines option has not been specified, use a default value */ flush_lines = 1; +#ifndef __GNU__ if (flush_lines > IOV_MAX) /* limit the flush_lines according to the current platform */ flush_lines = IOV_MAX; +#endif /* allocate the structure with the proper number of items at the end */ LogProtoFileWriter *self = (LogProtoFileWriter *)g_malloc0(sizeof(LogProtoFileWriter) + sizeof(struct iovec)*flush_lines);