From 5e6bb8e3966e7981341e85b7de867066452410db Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Fri, 3 Nov 2023 00:10:01 +0100 Subject: [PATCH] fix(ODBC): mac build and run #4230 --- Data/ODBC/ODBC.make | 6 ++++++ Data/ODBC/testsuite/Makefile | 2 ++ Data/testsuite/src/SQLExecutor.cpp | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Data/ODBC/ODBC.make b/Data/ODBC/ODBC.make index fc5797db10..2063fad1c8 100644 --- a/Data/ODBC/ODBC.make +++ b/Data/ODBC/ODBC.make @@ -5,7 +5,11 @@ # ifndef POCO_ODBC_INCLUDE +ifeq (0, $(shell test -e /usr/include/sql.h; echo $$?)) POCO_ODBC_INCLUDE = /usr/include +else ifeq (0, $(shell test -e /opt/homebrew/include; echo $$?)) +POCO_ODBC_INCLUDE = /opt/homebrew/include +endif endif ifndef POCO_ODBC_LIB @@ -13,6 +17,8 @@ ifeq (0, $(shell test -d /usr/lib/$(OSARCH)-linux-gnu; echo $$?)) POCO_ODBC_LIB = /usr/lib/$(OSARCH)-linux-gnu else ifeq (0, $(shell test -d /usr/lib64; echo $$?)) POCO_ODBC_LIB = /usr/lib64 +else ifeq (0, $(shell test -d /opt/homebrew/lib; echo $$?)) +POCO_ODBC_LIB = /opt/homebrew/lib else POCO_ODBC_LIB = /usr/lib endif diff --git a/Data/ODBC/testsuite/Makefile b/Data/ODBC/testsuite/Makefile index 0dd949e48e..17efd307d8 100644 --- a/Data/ODBC/testsuite/Makefile +++ b/Data/ODBC/testsuite/Makefile @@ -22,8 +22,10 @@ ifneq ($(OSNAME),Darwin) SYSLIBS += -lltdl endif ifneq ($(OSNAME),FreeBSD) +ifneq ($(OSNAME),Darwin) SYSLIBS += -ldl endif +endif objects = ODBCTestSuite Driver \ ODBCDB2Test ODBCMySQLTest ODBCOracleTest ODBCPostgreSQLTest \ diff --git a/Data/testsuite/src/SQLExecutor.cpp b/Data/testsuite/src/SQLExecutor.cpp index e319a019ad..607ff4dfb2 100644 --- a/Data/testsuite/src/SQLExecutor.cpp +++ b/Data/testsuite/src/SQLExecutor.cpp @@ -41,7 +41,6 @@ #include "Poco/Data/Transaction.h" #include "Poco/UnicodeConverter.h" #include "Poco/UTFString.h" -#include #include #include #include