--- a/exe/odbc-config.c
+++ b/exe/odbc-config.c
@@ -40,6 +40,33 @@
 #include <unistd.h>
 #endif
 
+#ifdef USE_UNIXODBC_CONF_H
+
+#ifdef HAVE_UNISTD_H
+#undef HAVE_UNISTD_H
+#endif
+#ifdef HAVE_PWD_H
+#undef HAVE_PWD_H
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#undef HAVE_SYS_TYPES_H
+#endif
+#ifdef HAVE_LONG_LONG
+#undef HAVE_LONG_LONG
+#endif
+#ifdef ODBCINT64
+#undef ODBCINT64
+#endif
+#ifdef UODBCINT64
+#undef UODBCINT64
+#endif
+#ifdef SIZEOF_LONG_INT
+#undef SIZEOF_LONG_INT
+#endif
+
+#include <unixodbc_conf.h>
+#endif
+
 #include <sql.h>
 
 static void usage( void )