# HG changeset patch # User Sebastien Jodogne # Date 1628663323 -7200 # Node ID 75ff5ce4a995a08a479cfc8ac204257796ffb029 # Parent fad7c6156923783808e142540b08a404638e8a69 fix odbc build for OSX diff -r fad7c6156923 -r 75ff5ce4a995 Resources/CMake/UnixOdbcConfiguration.cmake --- a/Resources/CMake/UnixOdbcConfiguration.cmake Wed Aug 11 08:00:46 2021 +0200 +++ b/Resources/CMake/UnixOdbcConfiguration.cmake Wed Aug 11 08:28:43 2021 +0200 @@ -50,6 +50,22 @@ ${UNIX_ODBC_SOURCES_DIR}/libltdl/ltdl.c ${UNIX_ODBC_SOURCES_DIR}/libltdl/slist.c ) + + if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + set(OSXHEADER 1) + set(__error_t_defined 1) + set(error_t int) + + # NB: The lines below might also be used for compatibility with + # LSB target version 4.0 instead of 5.0 (untested) + configure_file( + ${UNIX_ODBC_SOURCES_DIR}/libltdl/libltdl/lt__argz_.h + ${UNIX_ODBC_SOURCES_DIR}/libltdl/libltdl/lt__argz.h + COPYONLY) + list(APPEND LTDL_SOURCES + ${UNIX_ODBC_SOURCES_DIR}/libltdl/lt__argz.c + ) + endif() else() check_include_file("libltdl/lt_dlloader.h" HAVE_LT_DLLOADER_H) if (NOT HAVE_LT_DLLOADER_H) diff -r fad7c6156923 -r 75ff5ce4a995 Resources/Odbc/config.h.in --- a/Resources/Odbc/config.h.in Wed Aug 11 08:00:46 2021 +0200 +++ b/Resources/Odbc/config.h.in Wed Aug 11 08:28:43 2021 +0200 @@ -489,13 +489,13 @@ #cmakedefine _THREAD_SAFE /* Define so that glibc/gnulib argp.h does not typedef error_t. */ -#cmakedefine __error_t_defined +#cmakedefine __error_t_defined @__error_t_defined@ /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to a type to use for 'error_t' if it is not otherwise available. */ -#undef error_t +#cmakedefine error_t @error_t@ /* Define to `int' if doesn't define. */ #undef gid_t