summaryrefslogtreecommitdiff
path: root/contrib/dbase/dbf2pg.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/dbase/dbf2pg.c')
-rw-r--r--contrib/dbase/dbf2pg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/dbase/dbf2pg.c b/contrib/dbase/dbf2pg.c
index 8b7d989a072..5f5e9d2823f 100644
--- a/contrib/dbase/dbf2pg.c
+++ b/contrib/dbase/dbf2pg.c
@@ -16,6 +16,9 @@
#ifdef HAVE_ICONV_H
#include <iconv.h>
#endif
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
#include "libpq-fe.h"
#include "dbf.h"
@@ -673,7 +676,7 @@ main(int argc, char **argv)
char *query;
dbhead *dbh;
- while ((i = getopt(argc, argv, "DWflucvh:b:e:d:t:s:B:U:F:T:")) != EOF)
+ while ((i = getopt(argc, argv, "DWflucvh:b:e:d:t:s:B:U:F:T:")) != -1)
{
switch (i)
{