aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/ecpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/preproc/ecpg.c')
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c
index a06c27b24eb..c5d7beeece3 100644
--- a/src/interfaces/ecpg/preproc/ecpg.c
+++ b/src/interfaces/ecpg/preproc/ecpg.c
@@ -3,7 +3,11 @@
/* Placed under the same copyright as PostgresSQL */
#include <stdio.h>
-#include <getopt.h>
+#if HAVE_GETOPT_H
+# include <getopt.h>
+#else
+# include <unistd.h>
+#endif
#include <stdlib.h>
#include <strings.h>