public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/freetds] rawhide: [bugfix] Fix FTBFS with nettle 4.0: digest functions changed signature
@ 2026-07-29 10:50 Michal Schorm
0 siblings, 0 replies; only message in thread
From: Michal Schorm @ 2026-07-29 10:50 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/freetds
Branch : rawhide
Commit : 82aca510e3a281644aa1a5f10bd781296b6d788b
Author : Michal Schorm <mschorm@redhat.com>
Date : 2026-07-29T12:44:37+02:00
Stats : +25/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/freetds/c/82aca510e3a281644aa1a5f10bd781296b6d788b?branch=rawhide
Log:
[bugfix] Fix FTBFS with nettle 4.0: digest functions changed signature
Nettle 4.0 (in Fedora 45) changed 'md5_digest()' and 'md4_digest()'
from 3 arguments '(ctx, length, digest)' to 2 arguments '(ctx, digest)'.
The digest length is now implicit (always the algorithm's native size).
FreeTDS wraps the nettle API in inline functions in
'include/freetds/utils/md5.h' and 'include/freetds/utils/md4.h'.
Both called 'nettle_md5_digest(ctx, 16, digest)' and
'nettle_md4_digest(ctx, 16, digest)' respectively, which no longer
compiles:
error: too many arguments to function 'nettle_md5_digest';
expected 2, have 3
Drop the now-removed length argument from both call sites.
Co-Authored-By: Claude AI <noreply@anthropic.com>
---
diff --git a/freetds-1.4.23-nettle4.patch b/freetds-1.4.23-nettle4.patch
new file mode 100644
index 0000000..a7b7a78
--- /dev/null
+++ b/freetds-1.4.23-nettle4.patch
@@ -0,0 +1,22 @@
+--- a/include/freetds/utils/md4.h
++++ b/include/freetds/utils/md4.h
+@@ -38,7 +38,7 @@ static inline void MD4Update(MD4_CTX *ctx, const uint8_t *buf, size_t len)
+
+ static inline void MD4Final(MD4_CTX *ctx, uint8_t *digest)
+ {
+- nettle_md4_digest(ctx, 16, digest);
++ nettle_md4_digest(ctx, digest);
+ }
+
+
+--- a/include/freetds/utils/md5.h
++++ b/include/freetds/utils/md5.h
+@@ -40,7 +40,7 @@ static inline void MD5Update(MD5_CTX *ctx, const uint8_t *buf, size_t len)
+
+ static inline void MD5Final(MD5_CTX *ctx, uint8_t *digest)
+ {
+- nettle_md5_digest(ctx, 16, digest);
++ nettle_md5_digest(ctx, digest);
+ }
+
+ #endif
diff --git a/freetds.spec b/freetds.spec
index dfc0d01..852e39d 100644
--- a/freetds.spec
+++ b/freetds.spec
@@ -11,6 +11,8 @@ URL: http://www.freetds.org/
Source0: https://www.freetds.org/files/stable/%{name}-%{version}.tar.bz2
Source1: freetds-tds_sysdep_public.h
+Patch0: freetds-1.4.23-nettle4.patch
+
BuildRequires: unixODBC-devel, readline-devel, gnutls-devel, krb5-devel
BuildRequires: libgcrypt-devel
BuildRequires: libtool
@@ -61,6 +63,7 @@ If you like to develop programs using %{name}, you will need to install
%prep
%setup -q
+%patch -P0 -p1
# correct perl path
sed -i '1 s,#!.*/perl,#!%{__perl},' samples/*.pl
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-29 10:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-29 10:50 [rpms/freetds] rawhide: [bugfix] Fix FTBFS with nettle 4.0: digest functions changed signature Michal Schorm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox