2 Commits

Author SHA256 Message Date
46e1d4de33 Accepting request 1294808 from server:database
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1294808
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sqliteodbc?expand=0&rev=12
2025-07-21 18:02:11 +00:00
Tuukka Pasanen
5b6857b67f - added patches
fix build with gcc15
  + sqliteodbc-gcc15.patch

OBS-URL: https://build.opensuse.org/package/show/server:database/sqliteodbc?expand=0&rev=25
2025-07-21 11:53:52 +00:00
3 changed files with 83 additions and 1 deletions

73
sqliteodbc-gcc15.patch Normal file
View File

@@ -0,0 +1,73 @@
diff -upr sqliteodbc-0.99991.orig/sqlite3odbc.c sqliteodbc-0.99991/sqlite3odbc.c
--- sqliteodbc-0.99991.orig/sqlite3odbc.c 2025-06-25 15:01:51.572128342 +0000
+++ sqliteodbc-0.99991/sqlite3odbc.c 2025-06-26 06:29:23.121622140 +0000
@@ -1240,7 +1240,7 @@ static void
drvgetgpps(DBC *d)
{
void *lib;
- int (*gpps)();
+ int (*gpps)(char *, char *, char *, char *, int, char *);
lib = dlopen("libodbcinst.so.2", RTLD_LAZY);
if (!lib) {
@@ -1256,7 +1256,7 @@ drvgetgpps(DBC *d)
lib = dlopen("libiodbcinst.so", RTLD_LAZY);
}
if (lib) {
- gpps = (int (*)()) dlsym(lib, "SQLGetPrivateProfileString");
+ gpps = (int (*)(char *, char *, char *, char *, int, char *)) dlsym(lib, "SQLGetPrivateProfileString");
if (!gpps) {
dlclose(lib);
return;
@@ -14835,7 +14835,7 @@ drvtables(SQLHSTMT stmt,
#ifdef MEMORY_DEBUG
s->rowfree = xfree__;
#else
- s->rowfree = sqlite3_free;
+ s->rowfree = (void (*)(char **))sqlite3_free;
#endif
s->nrows = 2;
s->rowp = s->rowprs = -1;
@@ -15918,7 +15918,7 @@ drvgettypeinfo(SQLHSTMT stmt, SQLSMALLIN
#ifdef MEMORY_DEBUG
s->rowfree = xfree__;
#else
- s->rowfree = sqlite3_free;
+ s->rowfree = (void (*)(char **))sqlite3_free;
#endif
memset(s->rows, 0, sizeof (char *) * (s->nrows + 1) * asize);
if (sqltype == SQL_ALL_TYPES) {
diff -upr sqliteodbc-0.99991.orig/sqlite3odbc.h sqliteodbc-0.99991/sqlite3odbc.h
--- sqliteodbc-0.99991.orig/sqlite3odbc.h 2025-06-25 15:01:51.572481260 +0000
+++ sqliteodbc-0.99991/sqlite3odbc.h 2025-06-26 06:27:22.667908348 +0000
@@ -147,7 +147,7 @@ typedef struct dbc {
int pwdLen; /**< Length of password */
#ifdef USE_DLOPEN_FOR_GPPS
void *instlib;
- int (*gpps)();
+ int (*gpps)(char *, char *, char *, char *, int, char *);
#endif
#if defined(_WIN32) || defined(_WIN64)
CRITICAL_SECTION cs; /**< For serializing most APIs */
@@ -256,7 +256,7 @@ typedef struct stmt {
int rowp; /**< Current result row */
int rowprs; /**< Current start row of rowset */
char **rows; /**< 2-dim array, result set */
- void (*rowfree)(); /**< Free function for rows */
+ void (*rowfree)(char **); /**< Free function for rows */
int naterr; /**< Native error code */
char sqlstate[6]; /**< SQL state for SQLError() */
SQLCHAR logmsg[1024]; /**< Message for SQLError() */
diff -upr sqliteodbc-0.99991.orig/sqlite4odbc.h sqliteodbc-0.99991/sqlite4odbc.h
--- sqliteodbc-0.99991.orig/sqlite4odbc.h 2025-06-25 15:01:51.572963218 +0000
+++ sqliteodbc-0.99991/sqlite4odbc.h 2025-06-26 06:27:36.234956092 +0000
@@ -252,7 +252,7 @@ typedef struct stmt {
int rowp; /**< Current result row */
int rowprs; /**< Current start row of rowset */
char **rows; /**< 2-dim array, result set */
- void (*rowfree)(); /**< Free function for rows */
+ void (*rowfree)(char **); /**< Free function for rows */
int naterr; /**< Native error code */
char sqlstate[6]; /**< SQL state for SQLError() */
SQLCHAR logmsg[1024]; /**< Message for SQLError() */

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Jun 26 06:34:04 UTC 2025 - pgajdos@suse.com
- added patches
fix build with gcc15
+ sqliteodbc-gcc15.patch
-------------------------------------------------------------------
Sun Nov 26 10:36:03 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -26,6 +26,8 @@ URL: http://www.ch-werner.de/sqliteodbc
Source0: http://www.ch-werner.de/sqliteodbc/%{name}-%{version}.tar.gz
# This is not typical shared library but plugin for unixODBC
Source1: %{name}-rpmlintrc
# fix build with gcc15
Patch0: sqliteodbc-gcc15.patch
BuildRequires: dos2unix
BuildRequires: doxygen
BuildRequires: graphviz
@@ -54,7 +56,7 @@ unixODBC or iODBC driver managers. This package contains generated
documentation.
%prep
%setup -q
%autosetup -p1
# Fix bug https://bugzilla.novell.com/show_bug.cgi?id=969496
# No more changing time stamp for every time this builds
echo "HTML_TIMESTAMP = NO" >> doxygen.conf