[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: syslog-ng: FTBFS on hurd-i386



On Wed, 2011-11-16 at 17:55 +0100, Svante Signell wrote:
...
> 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.

Updated patch, conditioned on the availability of IOV_MAX instead of
__GNU__

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;
+#ifdef IOV_MAX
   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);



Reply to: