diff --git a/src/sbbs3/sbbscon.c b/src/sbbs3/sbbscon.c
index 856df54150ecdbd5f8a70bc030b1926d0eb4affd..222979e0ad84216c512b5caaa06e66d9d085b669 100644
--- a/src/sbbs3/sbbscon.c
+++ b/src/sbbs3/sbbscon.c
@@ -35,6 +35,10 @@
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
+#ifdef USE_LINUX_CAPS
+#define _GNU_SOURCE
+#endif
+
 /* ANSI headers */
 #include <stdio.h>
 #include <string.h>
@@ -60,6 +64,7 @@
 
 #ifdef USE_LINUX_CAPS
 #include <sys/capability.h>
+#include <sys/prctl.h>
 #endif
 
 #include <sys/types.h>
@@ -444,7 +449,6 @@ void list_caps(void)
 
 static int linux_keepcaps(void)
 {
-	char strbuf[100];
 	/*
 	 * Ask the kernel to allow us to keep our capabilities after we
 	 * setuid().