1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-13 10:59:13 +02:00
openwrt-packages/libs/unixodbc/patches/100-cross-compile-odbc-config.patch
Daniel Golle 5cc52f06aa 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>
2017-07-08 12:44:20 +02:00

37 lines
571 B
Diff

--- 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 )