Mercurial > hg > orthanc-databases
changeset 334:75ff5ce4a995
fix odbc build for OSX
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 11 Aug 2021 08:28:43 +0200 |
parents | fad7c6156923 |
children | 7ec461718edb |
files | Resources/CMake/UnixOdbcConfiguration.cmake Resources/Odbc/config.h.in |
diffstat | 2 files changed, 18 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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 <sys/types.h> doesn't define. */ #undef gid_t