diff --git a/src/timezone/zic.c b/src/timezone/zic.c
index 90fe89ea080bf433cdced1143141c0544ae8473a..ac52a43fec6382d54594fd304b36115d62a3dc95 100644
--- a/src/timezone/zic.c
+++ b/src/timezone/zic.c
@@ -3,13 +3,16 @@
  * 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/timezone/zic.c,v 1.8 2004/06/03 02:08:07 tgl Exp $
+ *	  $PostgreSQL: pgsql/src/timezone/zic.c,v 1.9 2004/07/22 01:41:24 tgl Exp $
  */
 
 #include "postgres.h"
 
-#include <locale.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
 #include <limits.h>
+#include <locale.h>
 
 #include "pgtz.h"
 #include "private.h"