]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib518, 537: drop `#error` on unlikely/impossible build condition
authorViktor Szakats <commit@vsz.me>
Thu, 5 Feb 2026 21:10:03 +0000 (22:10 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 5 Feb 2026 22:46:49 +0000 (23:46 +0100)
`FD_SETSIZE` is used in core code and expected to be present.

Closes #20530

tests/libtest/lib518.c
tests/libtest/lib537.c

index 3a0b3b9537fd7b68a4f0376deeeecfbfa071ce02..5c50ca5cbf0a7a138080b1fdc9f1be883e2568ba 100644 (file)
 
 #include "testutil.h"
 
-#ifndef FD_SETSIZE
-#error "this test requires FD_SETSIZE"
-#endif
-
 #define T518_SAFETY_MARGIN 16
 
 #define NUM_OPEN   (FD_SETSIZE + 10)
@@ -345,7 +341,6 @@ static int t518_test_rlimit(int keep_open)
   curl_mfprintf(stderr, "%s file descriptors open\n", strbuff);
 
 #if !defined(HAVE_POLL) && !defined(USE_WINSOCK)
-
   /*
    * when using select() instead of poll() we cannot test
    * libcurl functionality with a socket number equal or
@@ -383,8 +378,7 @@ static int t518_test_rlimit(int keep_open)
       return -11;
     }
   }
-
-#endif /* using an FD_SETSIZE bound select() */
+#endif /* !HAVE_POLL && !USE_WINSOCK */
 
   /*
    * Old or 'backwards compatible' implementations of stdio do not allow
index 23e0e5c3e9af2835c58051f06f0bb6c4fecbf1ea..82b92a02adc7b91c115184640db6109e1f3857d0 100644 (file)
 
 #include "testutil.h"
 
-#if !defined(HAVE_POLL) && !defined(USE_WINSOCK) && !defined(FD_SETSIZE)
-#error "this test requires FD_SETSIZE"
-#endif
-
 #define T537_SAFETY_MARGIN 11
 
 #if defined(_WIN32) || defined(MSDOS)
@@ -360,7 +356,6 @@ static int t537_test_rlimit(int keep_open)
   curl_mfprintf(stderr, "%s file descriptors open\n", strbuff);
 
 #if !defined(HAVE_POLL) && !defined(USE_WINSOCK)
-
   /*
    * when using select() instead of poll() we cannot test
    * libcurl functionality with a socket number equal or
@@ -398,8 +393,7 @@ static int t537_test_rlimit(int keep_open)
       return -9;
     }
   }
-
-#endif /* using an FD_SETSIZE bound select() */
+#endif /* !HAVE_POLL && !USE_WINSOCK */
 
   /*
    * Old or 'backwards compatible' implementations of stdio do not allow