--- a/netselect.c
+++ b/netselect.c
@@ -780,7 +780,7 @@
 #if !defined(__GLIBC__)
     int fromlen = sizeof(from);
 #else				/* __GLIBC__ */
-    size_t fromlen = sizeof(from);
+    socklen_t fromlen = sizeof(from);
 #endif				/* __GLIBC__ */
 
     FD_ZERO(&fds);