[Git][debian-proftpd-team/proftpd][master] Add patch from upstream to fix build failure on HURD.
Hilmar Preuße (@hilmar)
gitlab at salsa.debian.org
Wed Sep 3 23:13:16 BST 2025
Hilmar Preuße pushed to branch master at Debian ProFTPD Team / proftpd
Commits:
be1e0314 by Hilmar Preuße at 2025-09-04T00:13:07+02:00
Add patch from upstream to fix build failure on HURD.
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/3d3a936b696d73f24a7f1a99bf7aa26735ff2306.diff
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,6 +1,7 @@
proftpd-dfsg (1.3.9~dfsg-3) UNRELEASED; urgency=medium
* Set SHELL & CONFIG_SHELL in d/rules to make build reproducible.
+ * Add patch from upstream to fix build failure on HURD.
-- Hilmar Preuße <hille42 at debian.org> Wed, 03 Sep 2025 17:12:31 +0200
=====================================
debian/patches/3d3a936b696d73f24a7f1a99bf7aa26735ff2306.diff
=====================================
@@ -0,0 +1,65 @@
+From 3d3a936b696d73f24a7f1a99bf7aa26735ff2306 Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault at ens-lyon.org>
+Date: Wed, 27 Aug 2025 16:20:02 +0200
+Subject: [PATCH] Fix GNU/Hurd build (#1975)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GNU/Hurd uses the same glibc as Linux, and as such also follows posix by
+making the 2nd parameter of iconv() a char**.
+
+Otherwise, we get:
+```
+encode.c: In function ‘str_convert’:
+encode.c:71:25: error: passing argument 2 of ‘iconv’ from incompatible pointer type [-Wincompatible-pointer-types]
+ 71 | nconv = iconv(conv, &inbuf, inbuflen, &outbuf, outbuflen);
+ | ^~~~~~
+ | |
+ | const char **
+In file included from encode.c:32:
+/usr/include/iconv.h:49:54: note: expected ‘char ** restrict’ but argument is of type ‘const char **’
+ 49 | extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
+ | ~~~~~~~~~~~~~~~~~~^~~~~~~
+```
+---
+ contrib/mod_sftp/utf8.c | 4 ++--
+ src/encode.c | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/contrib/mod_sftp/utf8.c b/contrib/mod_sftp/utf8.c
+index d8078239b..021aa2739 100644
+--- a/contrib/mod_sftp/utf8.c
++++ b/contrib/mod_sftp/utf8.c
+@@ -52,11 +52,11 @@ static int utf8_convert(iconv_t conv, const char *inbuf, size_t *inbuflen,
+ pr_signals_handle();
+
+ /* Solaris/FreeBSD's iconv(3) takes a const char ** for the input buffer,
+- * whereas Linux/Mac OSX iconv(3) use char ** for the input buffer.
++ * whereas Linux/Mac OSX/GNU iconv(3) use char ** for the input buffer.
+ */
+ #if defined(LINUX) || defined(DARWIN6) || defined(DARWIN7) || \
+ defined(DARWIN8) || defined(DARWIN9) || defined(DARWIN10) || \
+- defined(DARWIN11) || defined(DARWIN12)
++ defined(DARWIN11) || defined(DARWIN12) || defined(GNU)
+
+ nconv = iconv(conv, (char **) &inbuf, inbuflen, &outbuf, outbuflen);
+ #else
+diff --git a/src/encode.c b/src/encode.c
+index 245b2d43a..3af7fad50 100644
+--- a/src/encode.c
++++ b/src/encode.c
+@@ -60,11 +60,11 @@ static int str_convert(iconv_t conv, const char *inbuf, size_t *inbuflen,
+ pr_signals_handle();
+
+ /* Solaris/FreeBSD's iconv(3) takes a const char ** for the input buffer,
+- * whereas Linux/Mac OSX iconv(3) use char ** for the input buffer.
++ * whereas Linux/Mac OSX/GNU iconv(3) use char ** for the input buffer.
+ */
+ #if defined(LINUX) || defined(DARWIN6) || defined(DARWIN7) || \
+ defined(DARWIN8) || defined(DARWIN9) || defined(DARWIN10) || \
+- defined(DARWIN11) || defined(DARWIN12)
++ defined(DARWIN11) || defined(DARWIN12) || defined(GNU)
+
+ nconv = iconv(conv, (char **) &inbuf, inbuflen, &outbuf, outbuflen);
+ #else
=====================================
debian/patches/series
=====================================
@@ -21,3 +21,4 @@ odbc
#14c006b62c09d1efe302c57b2d183a489bcb22dc.diff
#9b2b4a3e32d251798bf8fa841b124ab15ba58f11.diff
536608f849dddd2b551e7c1e4fd930a50a527ffe.diff
+3d3a936b696d73f24a7f1a99bf7aa26735ff2306.diff
View it on GitLab: https://salsa.debian.org/debian-proftpd-team/proftpd/-/commit/be1e031424fc2d20d891c9e1845281fbac67afa0
--
View it on GitLab: https://salsa.debian.org/debian-proftpd-team/proftpd/-/commit/be1e031424fc2d20d891c9e1845281fbac67afa0
You're receiving this email because of your account on salsa.debian.org.
More information about the Pkg-proftpd-maintainers
mailing list