Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
2.0.12
-
None
-
None
-
Fedora24
Description
Hello, I'm trying to pack and distribute odbc-connector to Fedora repos.
But there is critical error while compiling about undefined macro MARIADB_INVALID_SOCKET
_______________________________________
$ make
Scanning dependencies of target maodbc
[ 5%] Building C object CMakeFiles/maodbc.dir/odbc_3_api.c.o
[ 11%] Building C object CMakeFiles/maodbc.dir/ma_error.c.o
[ 17%] Building C object CMakeFiles/maodbc.dir/ma_connection.c.o
/home/ODBC/rpmbuild/SOURCES/mariadb-connector-odbc-2.0.12-ga-src/ma_connection.c: In function ‘CheckConnection’:
/home/ODBC/rpmbuild/SOURCES/mariadb-connector-odbc-2.0.12-ga-src/ma_connection.c:121:41: error: ‘MARIADB_INVALID_SOCKET’ undeclared (first use in this function)
if (mysql_get_socket(Dbc->mariadb) == MARIADB_INVALID_SOCKET)
^~~~~~~~~~~~~~~~~~~~~~
/home/ODBC/rpmbuild/SOURCES/mariadb-connector-odbc-2.0.12-ga-src/ma_connection.c:121:41: note: each undeclared identifier is reported only once for each function it appears in
CMakeFiles/maodbc.dir/build.make:110: návod pro cíl „CMakeFiles/maodbc.dir/ma_connection.c.o“ selhal
make[2]: *** [CMakeFiles/maodbc.dir/ma_connection.c.o] Chyba 1
CMakeFiles/Makefile2:67: návod pro cíl „CMakeFiles/maodbc.dir/all“ selhal
make[1]: *** [CMakeFiles/maodbc.dir/all] Error 2
Makefile:149: návod pro cíl „all“ selhal
make: *** [all] Error 2
______________________________________________
Sugested sollution:
add following to the beginning of file "ma_odbc.h" ( ~ line 28)
#ifndef MARIADB_INVALID_SOCKET
#define MARIADB_INVALID_SOCKET 0
#endif
Replace 0 with suitable value. I don't know what goes there since it is undefined in the source code.