[packages/unixODBC] - more fixes for C23 mode
qboosh
qboosh at pld-linux.org
Sat Jul 18 11:17:50 CEST 2026
commit 4eeaf05e0610b5da540330e51609c9fca6f3d40d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jul 18 11:17:56 2026 +0200
- more fixes for C23 mode
unixODBC-includes.patch | 10 +++++++++
unixODBC-proto.patch | 55 +++++++++++++++++++++++++++++++++++++++++++++++++
unixODBC.spec | 5 +++++
3 files changed, 70 insertions(+)
---
diff --git a/unixODBC.spec b/unixODBC.spec
index dcefce2..3027d2d 100644
--- a/unixODBC.spec
+++ b/unixODBC.spec
@@ -8,6 +8,8 @@ Group: Libraries
Source0: ftp://ftp.unixodbc.org/pub/unixODBC/%{name}-%{version}.tar.gz
# Source0-md5: 316cede4896eb768fe4572d71dc04537
Patch0: %{name}-bool.patch
+Patch1: %{name}-includes.patch
+Patch2: %{name}-proto.patch
URL: https://www.unixodbc.org/
BuildRequires: flex
BuildRequires: libltdl-devel >= 2:2
@@ -62,8 +64,11 @@ Biblioteki statyczne unixODBC.
%prep
%setup -q
%patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
%build
+CPPFLAGS="%{rpmcppflags} -D_DEFAULT_SOURCE"
%configure \
--enable-driver-config \
--enable-drivers \
diff --git a/unixODBC-includes.patch b/unixODBC-includes.patch
new file mode 100644
index 0000000..26960f7
--- /dev/null
+++ b/unixODBC-includes.patch
@@ -0,0 +1,10 @@
+--- unixODBC-2.3.14/DriverManager/drivermanager.h.orig 2025-05-04 17:13:33.000000000 +0200
++++ unixODBC-2.3.14/DriverManager/drivermanager.h 2026-07-18 10:21:30.139598922 +0200
+@@ -31,6 +31,7 @@
+ #elif HAVE_LIBTHREAD
+ #include <thread.h>
+ #endif
++#include <stdint.h>
+
+ #define SQL_NOUNICODEMAP
+ #define UNICODE
diff --git a/unixODBC-proto.patch b/unixODBC-proto.patch
new file mode 100644
index 0000000..b33a3ce
--- /dev/null
+++ b/unixODBC-proto.patch
@@ -0,0 +1,55 @@
+--- unixODBC-2.3.14/Drivers/nn/SQLFetch.c.orig 2022-02-09 22:44:40.000000000 +0100
++++ unixODBC-2.3.14/Drivers/nn/SQLFetch.c 2026-07-18 11:01:03.350075470 +0200
+@@ -121,7 +121,7 @@ RETCODE SQL_API SQLFetch( HSTMT hstmt )
+ return SQL_ERROR;
+ }
+
+- ret = cvt( ptr, pcol->userbuf, pcol->userbufsize, &clen);
++ ret = ((char *(*)(char *, char *, long, long *))cvt)( ptr, pcol->userbuf, pcol->userbufsize, &clen);
+
+ if ( ret )
+ {
+--- unixODBC-2.3.14/Drivers/nn/SQLGetData.c.orig 2022-02-09 22:44:40.000000000 +0100
++++ unixODBC-2.3.14/Drivers/nn/SQLGetData.c 2026-07-18 11:03:06.176076731 +0200
+@@ -116,7 +116,7 @@ RETCODE SQL_API SQLGetData(
+ return SQL_ERROR;
+ }
+
+- ret = cvt(ptr, rgbValue, cbValueMax, &clen);
++ ret = ((char *(*)(char *, PTR, SDWORD, int *))cvt)(ptr, rgbValue, cbValueMax, &clen);
+
+ if ( ret )
+ {
+--- unixODBC-2.3.14/Drivers/nn/SQLParamData.c.orig 2022-02-09 22:44:40.000000000 +0100
++++ unixODBC-2.3.14/Drivers/nn/SQLParamData.c 2026-07-18 11:04:48.735521119 +0200
+@@ -43,7 +43,7 @@ RETCODE SQL_API SQLParamData(
+ else
+ {
+ cvt = ppar->cvt;
+- data= cvt(ppar->putdtbuf, ppar->putdtlen, &dt);
++ data= ((char *(*)(char *, int, date_t *))cvt)(ppar->putdtbuf, ppar->putdtlen, &dt);
+ }
+
+ MEM_FREE( ppar->putdtbuf );
+--- unixODBC-2.3.14/Drivers/nn/SQLPutData.c.orig 2022-02-09 22:44:40.000000000 +0100
++++ unixODBC-2.3.14/Drivers/nn/SQLPutData.c 2026-07-18 11:05:45.101882423 +0200
+@@ -67,7 +67,7 @@ RETCODE SQL_API SQLPutData(
+ }
+
+ cvt = ppar->cvt;
+- data= cvt(ppar->putdtbuf, ppar->putdtlen, &dt);
++ data= ((char *(*)(char *, int, date_t *))cvt)(ppar->putdtbuf, ppar->putdtlen, &dt);
+
+ if ( data == (char*)(-1) )
+ {
+--- unixODBC-2.3.14/Drivers/nn/execute.c.orig 2018-01-02 11:48:19.000000000 +0100
++++ unixODBC-2.3.14/Drivers/nn/execute.c 2026-07-18 11:07:58.631159033 +0200
+@@ -124,7 +124,7 @@ int sqlexecute (
+ }
+
+ cvt = ppar->cvt;
+- data= cvt(ppar->userbuf, csize, &date );
++ data= ((char *(*)(char *, long, date_t *))cvt)(ppar->userbuf, csize, &date );
+
+ if( data == (char*)(-1) )
+ {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/unixODBC.git/commitdiff/4eeaf05e0610b5da540330e51609c9fca6f3d40d
More information about the pld-cvs-commit
mailing list