]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
sched: don't define FD_SETSIZE
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 22 May 2025 12:56:57 +0000 (14:56 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 26 May 2025 14:34:23 +0000 (16:34 +0200)
Don't make any assumptions about fd_set size if FD_SETSIZE is missing.
POSIX requires the macro to be defined.

sched.c

diff --git a/sched.c b/sched.c
index 676866efe9bc0f8417ce02c8a542dc47917ed52f..973bcaa3c3b8c6bbc58005bfae24188e7e1be860 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -47,12 +47,6 @@ static int initialised = 0;
 /* One more than the highest file descriptor that is registered */
 static unsigned int one_highest_fd;
 
-#ifndef FD_SETSIZE
-/* If FD_SETSIZE is not defined, assume that fd_set is implemented
-   as a fixed size array of bits, possibly embedded inside a record */
-#define FD_SETSIZE (sizeof(fd_set) * 8)
-#endif
-
 typedef struct {
   SCH_FileHandler       handler;
   SCH_ArbitraryArgument arg;