mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
unixodbc: fix cross-compile drivers
build odbc_config for host so drivers may use it to figure out build details, patch odbc_config to return target specific values from unixodbc_conf.h. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
--- 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 )
|
||||
Reference in New Issue
Block a user