unixODBCDrivers.sqlite: fix build with gcc15
- add patch from fedora fixing incompatible-pointer-types errors.
Fixes build failure with gcc15:
```
sqlite3odbc.c:4521:24: error: assignment to 'void (*)(void)'
from incompatible pointer type 'void (*)(char **)' [-Wincompatible-pointer-types]
4521 | s->rowfree = freerows;
| ^
sqlite3odbc.c:2185:1: note: 'freerows' declared here
2185 | freerows(char **rowp)
| ^~~~~~~~
sqlite3odbc.c: In function 'drvtableprivileges':
sqlite3odbc.c:6173:24: error: assignment to 'void (*)(void)'
from incompatible pointer type 'void (*)(char **)' [-Wincompatible-pointer-types]
6173 | s->rowfree = sqlite3_free_table;
| ^
In file included from sqlite3odbc.h:49,
from sqlite3odbc.c:25:
/nix/store/w3ibvzff0yrpg8abrl8n2fxn0d9fpfpc-sqlite-3.50.2-dev/include/sqlite3.h:3144:17:
note: 'sqlite3_free_table' declared here
3144 | SQLITE_API void sqlite3_free_table(char **result);
| ^~~~~~~~~~~~~~~~~~
sqlite3odbc.c: In function 'drvprimarykeys':
sqlite3odbc.c:6593:16: error: assignment to 'void (*)(void)' from
incompatible pointer type 'void (*)(char **)' [-Wincompatible-pointer-types]
6593 | s->rowfree = freerows;
| ^
```
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
config,
|
||||
fetchpatch,
|
||||
fetchurl,
|
||||
stdenv,
|
||||
unixODBC,
|
||||
@@ -111,6 +112,15 @@
|
||||
sha256 = "0dgsj28sc7f7aprmdd0n5a1rmcx6pv7170c8dfjl0x1qsjxim6hs";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix build with gcc15
|
||||
(fetchpatch {
|
||||
name = "sqlite-connector-odbc-fix-incompatible-pointer-compilation-error.patch";
|
||||
url = "https://src.fedoraproject.org/rpms/sqliteodbc/raw/e3d93f5909c884fd8846b36b71ba67a3ad65da2a/f/sqliteodbc-0.99991-Fix-incompatible-pointer-compilation-error.patch";
|
||||
hash = "sha256-IAZDujEkAyU40sKa4GC+upURNt7vplCDAx91Eeny+bU=";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
unixODBC
|
||||
sqlite
|
||||
|
||||
Reference in New Issue
Block a user