diff --git a/src/fd_control.c b/src/fd_control.c
index 6cc4ab13f35a7c0d797aff3372a176513c72f9c9..df08133cd16b0a31dfd7535101fb486941b9aac4 100644
--- a/src/fd_control.c
+++ b/src/fd_control.c
@@ -10,7 +10,7 @@
 #include "pike_error.h"
 #include "fdlib.h"
 
-RCSID("$Id: fd_control.c,v 1.35 2000/12/05 21:08:17 per Exp $");
+RCSID("$Id: fd_control.c,v 1.36 2001/01/21 20:40:38 grubba Exp $");
 
 #else /* TESTING */
 
@@ -137,6 +137,12 @@ PMOD_EXPORT int query_nonblocking(int fd)
   return ret;
 }
 
+/* The following code doesn't link without help, and
+ * since it isn't needed by the nonblocking test, we
+ * can safely disable it.
+ */
+#ifndef TESTING
+
 #ifndef FD_CLOEXEC
 #define FD_CLOEXEC 1
 #endif /* FD_CLOEXEC */
@@ -213,6 +219,8 @@ PMOD_EXPORT int set_close_on_exec(int fd, int which)
 #endif /* !HAVE_BROKEN_F_SETFD */
 }
 
+#endif /* !TESTING */
+
 #ifdef TESTING