diff --git a/lib/config.dj b/lib/config.dj
index 4b53bd9ae15f1edacc2b843ef62a100b3afb5b53..04cf4db41e94a4e3d3ebec73c914822707c8e1ba 100644
--- a/lib/config.dj
+++ b/lib/config.dj
@@ -15,6 +15,7 @@
 #define HAVE_BASENAME          1
 #define HAVE_CLOSESOCKET       1
 #define HAVE_FCNTL_H           1
+#define HAVE_FIONBIO           1
 #define HAVE_GETHOSTBYADDR     1
 #define HAVE_GETHOSTNAME       1
 #define HAVE_GETPASS           1
@@ -104,7 +105,10 @@
 
 #define in_addr_t  u_long
 #define socklen_t  int
+
+#if __GNUC__ < 4   /* gcc 4.x built-in ? */
 #define ssize_t    int
+#endif
 
 #include <stdlib.h>
 #include <string.h>