--- apg.c.dist	2003-08-04 11:30:09.000000000 +0200
+++ apg.c	2003-08-04 11:30:33.000000000 +0200
@@ -150,7 +150,7 @@
 #endif /* APG_USE_CRYPT */
 #endif /* CLISERV */
 #ifdef CLISERV
-#if defined(sgi) || defined(__APPLE__) || defined(__QNX__) /* Thanks to Andrew J. Caird */
+#if defined(sgi) || defined(__APPLE__) || defined(__QNX__) || defined(NEED_SOCKLEN_T) /* Thanks to Andrew J. Caird */
  typedef unsigned int socklen_t;
 #endif
  socklen_t len;
