--- a/nss/coreconf/nsinstall/nsinstall.c
+++ b/nss/coreconf/nsinstall/nsinstall.c
@@ -36,8 +36,8 @@ typedef unsigned int mode_t;
 #undef HAVE_FCHMOD
 #endif
 
-#ifdef LINUX
 #include <getopt.h>
+#ifdef LINUX
 #endif
 
 #if defined(SCO) || defined(UNIXWARE) || defined(SNI) || defined(NCR) || defined(NEC)
