Bug#805157: virtuoso-opensource: FTBFS on s390x: conflicting types for 'saddr_t'
tags 805157 patch
user ubuntu-devel@lists.ubuntu.com
usertags 805157 ubuntu-patch xenial
thanks
On Sun, Nov 15, 2015 at 01:33:25PM +0100, Kurt Roeckx wrote:
> Your package is failing to build on s390x with the following
> error:
> In file included from Dksestcp.c:32:0:
> Dksestcpint.h:45:25: error: conflicting types for 'saddr_t'
> typedef struct sockaddr saddr_t;
> ^
> In file included from /usr/include/linux/types.h:4:0,
> from /usr/include/s390x-linux-gnu/asm/sigcontext.h:10,
> from /usr/include/s390x-linux-gnu/bits/sigcontext.h:27,
> from /usr/include/signal.h:332,
> from ../../libsrc/Dk/Dksystem.h:62,
> from ../../libsrc/Dk.h:40,
> from Dksestcp.c:30:
> /usr/include/s390x-linux-gnu/asm/types.h:18:25: note: previous declaration of 'saddr_t' was here
> typedef __signed__ long saddr_t;
> ^
This should do the trick.
* Remove the saddr_t typedef, which clashes with system headers on s390x
(closes: #805157).
diff -Nru virtuoso-opensource-6.1.6+dfsg2/debian/patches/remove-saddr_t-typedef.patch virtuoso-opensource-6.1.6+dfsg2/debian/patches/remove-saddr_t-typedef.patch
--- virtuoso-opensource-6.1.6+dfsg2/debian/patches/remove-saddr_t-typedef.patch 1970-01-01 01:00:00.000000000 +0100
+++ virtuoso-opensource-6.1.6+dfsg2/debian/patches/remove-saddr_t-typedef.patch 2015-12-24 17:39:52.000000000 +0000
@@ -0,0 +1,50 @@
+Description: Remove the saddr_t typedef
+ This clashes with system headers on s390x.
+Author: Colin Watson <cjwatson@ubuntu.com>
+Bug-Debian: https://bugs.debian.org/805157
+Forwarded: no
+Last-Update: 2015-12-24
+
+Index: b/libsrc/Dk/Dksestcp.c
+===================================================================
+--- a/libsrc/Dk/Dksestcp.c
++++ b/libsrc/Dk/Dksestcp.c
+@@ -587,7 +587,7 @@
+ {
+ int rc;
+ int new_socket;
+- socklen_t addrlen = sizeof (saddr_t);
++ socklen_t addrlen = sizeof (struct sockaddr);
+
+ dbg_printf_1 (("tcpses_accept."));
+
+@@ -2481,7 +2481,7 @@
+ return (SER_CNTRL);
+ }
+
+- if ((rc = bind (s, (saddr_t *) p_addr, sizeof (saddrun_t))) < 0)
++ if ((rc = bind (s, (struct sockaddr *) p_addr, sizeof (saddrun_t))) < 0)
+ {
+
+ test_eintr (ses, rc, errno);
+Index: b/libsrc/Dk/Dksestcpint.h
+===================================================================
+--- a/libsrc/Dk/Dksestcpint.h
++++ b/libsrc/Dk/Dksestcpint.h
+@@ -42,7 +42,6 @@
+
+
+ typedef struct sockaddr_in saddrin_t;
+-typedef struct sockaddr saddr_t;
+ #ifdef COM_UNIXSOCK
+ typedef struct sockaddr_un saddrun_t;
+ #endif
+@@ -53,7 +52,7 @@
+ #ifdef COM_UNIXSOCK
+ saddrun_t u;
+ #endif
+- saddr_t a;
++ struct sockaddr a;
+ } usaddr_t;
+ #define TCP_HOSTNAMELEN 100 /* Something */
+
diff -Nru virtuoso-opensource-6.1.6+dfsg2/debian/patches/series virtuoso-opensource-6.1.6+dfsg2/debian/patches/series
--- virtuoso-opensource-6.1.6+dfsg2/debian/patches/series 2014-09-15 17:34:46.000000000 +0100
+++ virtuoso-opensource-6.1.6+dfsg2/debian/patches/series 2015-12-24 17:40:01.000000000 +0000
@@ -15,3 +15,4 @@
safer-timeout.patch
17-fix-imagemagick-detection.patch
remove_ckeditor_mini
+remove-saddr_t-typedef.patch
--
Colin Watson [cjwatson@debian.org]
Reply to: