Unverified Commit dee8f464 authored by toonn's avatar toonn Committed by GitHub
Browse files

Merge pull request #253532 from reckenrode/mariadb-odbc-connector-fix

mariadb-connector-odbc: fix build with clang 16 on Darwin
parents b630946b 7a2e2458
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -55,8 +55,14 @@
      fetchSubmodules = true;
    };

    patches = [
      # Fix `call to undeclared function 'sleep'` with clang 16
      ./mariadb-connector-odbc-unistd.patch
    ];

    nativeBuildInputs = [ cmake ];
    buildInputs = [ unixODBC openssl libiconv ];
    buildInputs = [ unixODBC openssl libiconv zlib ]
      ++ lib.optionals stdenv.isDarwin [ libkrb5 ];

    preConfigure = ''
      # we don't want to build a .pkg
@@ -66,6 +72,7 @@
    '';

    cmakeFlags = [
      "-DWITH_EXTERNAL_ZLIB=ON"
      "-DODBC_LIB_DIR=${lib.getLib unixODBC}/lib"
      "-DODBC_INCLUDE_DIR=${lib.getDev unixODBC}/include"
      "-DWITH_OPENSSL=ON"
+12 −0
Original line number Diff line number Diff line
diff -ur a/test/use_result.c b/test/use_result.c
--- a/test/use_result.c	1969-12-31 19:00:01.000000000 -0500
+++ b/test/use_result.c	2023-09-05 00:08:12.979889343 -0400
@@ -23,6 +23,8 @@
   51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
+#include <unistd.h>
+
 #include "tap.h"
 
 SQLINTEGER my_max_rows= 100;