From 8129098ed2eecdc79abb70215f9529f68f5e0af1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= Date: Sun, 16 Sep 2012 02:21:39 +0200 Subject: [PATCH 1/2] replace: add some includes for poll.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See bug #8107 Autobuild-User(master): Björn Jacke Autobuild-Date(master): Sun Sep 16 04:05:08 CEST 2012 on sn-devel-104 (cherry picked from commit 520c9b0b0ae33e6e8fb78034cfff685f5491aab3) (cherry picked from commit ea96d79e21a549204a7f64307059ea877bfb9fd5) --- lib/replace/poll.c | 6 ++++++ 1 Datei geändert, 6 Zeilen hinzugefügt(+) diff --git a/lib/replace/poll.c b/lib/replace/poll.c index e41548d..c855177 100644 --- a/lib/replace/poll.c +++ b/lib/replace/poll.c @@ -30,6 +30,12 @@ #include "replace.h" #include "system/select.h" +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_SYS_IOCTL_H +#include +#endif int rep_poll(struct pollfd *fds, nfds_t nfds, int timeout) -- 1.7.12 From 9c5420f3b162536a3b9a9f289de6a0bf7d94702d Mon Sep 17 00:00:00 2001 From: Joachim Schmitz Date: Mon, 17 Sep 2012 05:26:31 -0700 Subject: [PATCH 2/2] libreplace: Bug 8107, Fix poll replacement to become a msleep replacement Signed-off-by: Jeremy Allison (cherry picked from commit 7542b63188f7e73588c9abb40e36a910c87bc534) --- lib/replace/poll.c | 2 +- 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-) diff --git a/lib/replace/poll.c b/lib/replace/poll.c index c855177..1105617 100644 --- a/lib/replace/poll.c +++ b/lib/replace/poll.c @@ -46,7 +46,7 @@ int rep_poll(struct pollfd *fds, nfds_t nfds, int timeout) int rc; nfds_t i; - if (fds == NULL) { + if ((fds == NULL) && (nfds != 0)) { errno = EFAULT; return -1; } -- 1.7.12