]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
OpenBSD: Fix kqueue detection and one error.
authorRoy Marples <roy@marples.name>
Thu, 28 Jan 2021 12:13:24 +0000 (12:13 +0000)
committerRoy Marples <roy@marples.name>
Thu, 28 Jan 2021 12:13:24 +0000 (12:13 +0000)
configure
src/privsep-root.c

index 59673c867edd266bf5dad441cd7ab5c98af81d2c..c8f15749c3c72e0d20fc57be27ad41251baf9477 100755 (executable)
--- a/configure
+++ b/configure
@@ -1226,7 +1226,7 @@ if [ -z "$POLL" ]; then
        cat <<EOF >_kqueue1.c
 #include <sys/event.h>
 #include <sys/fcntl.h>
-#include <sys/wait.h>
+#include <sys/time.h>
 int main(void) {
        return kqueue1(O_CLOEXEC);
 }
@@ -1243,8 +1243,9 @@ fi
 if [ -z "$POLL" ]; then
        printf "Testing for kqueue ... "
        cat <<EOF >_kqueue.c
+#include <sys/types.h>
 #include <sys/event.h>
-#include <sys/wait.h>
+#include <sys/time.h>
 int main(void) {
        return kqueue();
 }
index cfdcbb2c22761420868ec9da84ba320882ca6adb..eb6087f5b86422d6e088e3299263b0d3b9b37058 100644 (file)
@@ -788,7 +788,8 @@ ps_root_log(void *arg)
 {
        struct dhcpcd_ctx *ctx = arg;
 
-       if (logreadfd(ctx->ps_log_fd) == -1)
+       /* OpenBSD reports connection reset when dhcpcd exits ... */
+       if (logreadfd(ctx->ps_log_fd) == -1 && errno != ECONNRESET)
                logerr(__func__);
 }