From b5bb2ccac186df25571f92caa0f0ee41a42427a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Thu, 1 Apr 1999 18:07:40 -0800 Subject: [PATCH] bugfix for missing IOV_MAX Rev: src/modules/files/file.c:1.144 --- src/modules/files/file.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/modules/files/file.c b/src/modules/files/file.c index 4894568db1..14c918f6a8 100644 --- a/src/modules/files/file.c +++ b/src/modules/files/file.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: file.c,v 1.143 1999/04/01 15:20:27 grubba Exp $"); +RCSID("$Id: file.c,v 1.144 1999/04/02 02:07:40 hubbe Exp $"); #include "fdlib.h" #include "interpret.h" #include "svalue.h" @@ -930,9 +930,14 @@ static void file_write(INT32 args) int fd = FD; int cnt = iovcnt; THREADS_ALLOW(); - if (cnt > IOV_MAX) { - cnt = IOV_MAX; - } + +#ifdef IOV_MAX + if (cnt > IOV_MAX) cnt = IOV_MAX; +#endif + +#ifdef MAX_IOVEC + if (cnt > MAX_IOVEC) cnt = MAX_IOVEC; +#endif i = writev(fd, iov, cnt); THREADS_DISALLOW(); -- GitLab