From c07618f55cb0cc302cd1febfd06a716c0acf7f22 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Thu, 2 Sep 2021 10:35:10 -0700 Subject: [PATCH] Do not attempt to use ether_fd as valid fd if it is -1. Closes medley #450 --- src/uraid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uraid.c b/src/uraid.c index e0a333a..3eb8872 100644 --- a/src/uraid.c +++ b/src/uraid.c @@ -979,7 +979,7 @@ int device_after_raid() { #ifdef MAIKO_ENABLE_ETHERNET - FD_SET(ether_fd, &LispReadFds); + if (ether_fd > 0) FD_SET(ether_fd, &LispReadFds); #endif /* MAIKO_ENABLE_ETHERNET */ #ifdef XWINDOW