bpo-28667: Fix a compile warning on FreeBSD when compare with FD_SETSIZE. (#501)
FreeBSD is the only platforms with unsigned FD_SETSIZE.
diff --git a/Include/fileobject.h b/Include/fileobject.h
index 6120e51..1dde17e 100644
--- a/Include/fileobject.h
+++ b/Include/fileobject.h
@@ -39,7 +39,7 @@
/* A routine to check if a file descriptor can be select()-ed. */
#ifdef HAVE_SELECT
- #define _PyIsSelectable_fd(FD) (((FD) >= 0) && ((FD) < FD_SETSIZE))
+ #define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE)
#else
#define _PyIsSelectable_fd(FD) (1)
#endif /* HAVE_SELECT */