Control: tag -1 patch

Hi,

On Mon, Jul 29, 2024 at 07:46:46AM +0200, Lucas Nussbaum wrote:
Source: sitecopy
Version: 1:0.16.6-13
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20240728 ftbfs-trixie

Hi,


Relevant part (hopefully):
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_CONFIG_H -DLOCALEDIR=\"/usr/share/locale\" 
-I./src -I./lib -g -O2 -Werror=implicit-function-declaration 
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection 
-Wformat -Werror=format-security -fcf-protection -Wall -I/usr/include/neon -o src/davdriver.o -c 
src/davdriver.c
src/ftp.c: In function ‘dtp_open_active’:
src/ftp.c:645:47: error: passing argument 3 of ‘getsockname’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  645 |                     (struct sockaddr *)&addr, &alen) < 0) {
      |                                               ^~~~~
      |                                               |
      |                                               size_t * {aka long 
unsigned int *}
In file included from src/ftp.c:30:
/usr/include/x86_64-linux-gnu/sys/socket.h:117:47: note: expected ‘socklen_t * 
restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘size_t *’ 
{aka ‘long unsigned int *’}
  117 |                         socklen_t *__restrict __len) __THROW;
      |                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~
src/ftp.c:675:57: error: passing argument 3 of ‘getsockname’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  675 |     if (getsockname(listener, (struct sockaddr *)&addr, &alen) < 0) {
      |                                                         ^~~~~
      |                                                         |
      |                                                         size_t * {aka 
long unsigned int *}
/usr/include/x86_64-linux-gnu/sys/socket.h:117:47: note: expected ‘socklen_t * 
restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘size_t *’ 
{aka ‘long unsigned int *’}
  117 |                         socklen_t *__restrict __len) __THROW;
      |                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~

I proposed a patch to fix the issue, please review in at your free time.
any issue please let me know. Thanks.

--
Regards,
--
  Bo YU

diff -Nru sitecopy-0.16.6/debian/changelog sitecopy-0.16.6/debian/changelog
--- sitecopy-0.16.6/debian/changelog    2024-06-28 14:12:44.000000000 -0400
+++ sitecopy-0.16.6/debian/changelog    2024-08-29 09:06:22.000000000 -0400
@@ -1,3 +1,10 @@
+sitecopy (1:0.16.6-13.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix ftbfs on gcc-14. (Closes: #1077410)
+
+ -- Bo YU <tsu.y...@gmail.com>  Thu, 29 Aug 2024 09:06:22 -0400
+
 sitecopy (1:0.16.6-13) unstable; urgency=medium
 
   * QA upload.
diff -Nru sitecopy-0.16.6/debian/patches/33_fix-ftbfs-gcc14.patch 
sitecopy-0.16.6/debian/patches/33_fix-ftbfs-gcc14.patch
--- sitecopy-0.16.6/debian/patches/33_fix-ftbfs-gcc14.patch     1969-12-31 
19:00:00.000000000 -0500
+++ sitecopy-0.16.6/debian/patches/33_fix-ftbfs-gcc14.patch     2024-08-29 
09:06:22.000000000 -0400
@@ -0,0 +1,17 @@
+Description: fix ftbfs on gcc-14
+Author: Bo YU <tsu.y...@gmail.com>
+Bug: https://bugs.debian.org/1077410
+Last-Update: 2024-08-29
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/ftp.c
++++ b/src/ftp.c
+@@ -634,7 +634,7 @@
+     char *a, *p;
+     int ret;
+     int listener;
+-    size_t alen;
++    socklen_t alen;
+     struct sockaddr_in addr;
+ 
+     ret = ftp_open(sess);
diff -Nru sitecopy-0.16.6/debian/patches/series 
sitecopy-0.16.6/debian/patches/series
--- sitecopy-0.16.6/debian/patches/series       2024-06-28 05:00:42.000000000 
-0400
+++ sitecopy-0.16.6/debian/patches/series       2024-08-29 09:06:22.000000000 
-0400
@@ -8,3 +8,4 @@
 30-bts320586-manpage-document-sftp.patch
 31_Fix-various-issues.diff
 32_neon-0.31.patch
+33_fix-ftbfs-gcc14.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to