1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Add a system dir to be able to load drivers from a system dir without having a full
path to the drivers, as it is done nowadays on debian systems
Index: libiodbc2/iodbc/connect.c
===================================================================
--- libiodbc2.orig/iodbc/connect.c 2014-05-09 13:08:22.282851046 +0200
+++ libiodbc2/iodbc/connect.c 2014-05-09 13:08:22.282851046 +0200
@@ -1088,6 +1088,14 @@
genv = (GENV_t *) pdbc->genv;
+#ifdef SYSTEM_DIR
+ char path_with_multiarch[1024];
+ if (!(path[0] == '/' || path[0] == '.')) {
+ snprintf(path_with_multiarch,sizeof (path_with_multiarch), "%s/%s", SYSTEM_DIR, path);
+ path = path_with_multiarch;
+ }
+#endif
+
/* This will either load the driver dll or increase its reference count */
hdll = _iodbcdm_dllopen ((char *) path);
|