summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2021-01-09 14:52:42 +0100
committerLars Wendler <polynomial-c@gentoo.org>2021-01-09 14:53:07 +0100
commit70a6c877b9763fb19eb292bd0b15243d5fd534d4 (patch)
tree4540daa4023b73d6f863d7d51617a1263ab79c28 /net-misc
parentdev-libs/nss: Removed old (diff)
downloadgentoo-70a6c877b9763fb19eb292bd0b15243d5fd534d4.tar.gz
gentoo-70a6c877b9763fb19eb292bd0b15243d5fd534d4.tar.bz2
gentoo-70a6c877b9763fb19eb292bd0b15243d5fd534d4.zip
net-misc/socat: Fixed build on 32bit arches
with kind permission from Sam Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/socat/files/socat-1.7.4.0-32bit_build_fix.patch42
-rw-r--r--net-misc/socat/socat-1.7.4.0.ebuild4
2 files changed, 46 insertions, 0 deletions
diff --git a/net-misc/socat/files/socat-1.7.4.0-32bit_build_fix.patch b/net-misc/socat/files/socat-1.7.4.0-32bit_build_fix.patch
new file mode 100644
index 000000000000..0b391ed8929a
--- /dev/null
+++ b/net-misc/socat/files/socat-1.7.4.0-32bit_build_fix.patch
@@ -0,0 +1,42 @@
+2021-01-08: Quick fix to a compilation failure especially on 32 bit systems
+
+--- socat-1.7.4.0/compat.h
++++ socat-1.7.4.0/compat.h
+@@ -134,6 +134,8 @@
+ # define F_uint64_t "%u"
+ # elif HAVE_BASIC_UINT64_T==6
+ # define F_uint64_t "%lu"
++# elif HAVE_BASIC_UINT64_T==8
++# define F_uint64_t "%llu"
+ # else
+ # error "HAVE_BASIC_UINT64_T is out of range:" HAVE_BASIC_UINT64_T
+ # endif
+@@ -147,7 +149,7 @@
+ # elif HAVE_BASIC_INT16_T==3
+ # define F_int16_t "%d"
+ # elif HAVE_BASIC_INT16_T==5
+-# define F_int16_t "%l"
++# define F_int16_t "%ld"
+ # else
+ # error "HAVE_BASIC_INT16_T is out of range:" HAVE_BASIC_INT16_T
+ # endif
+@@ -161,7 +163,7 @@
+ # elif HAVE_BASIC_INT32_T==3
+ # define F_int32_t "%d"
+ # elif HAVE_BASIC_INT32_T==5
+-# define F_int32_t "%l"
++# define F_int32_t "%ld"
+ # else
+ # error "HAVE_BASIC_INT32_T is out of range:" HAVE_BASIC_INT32_T
+ # endif
+@@ -175,7 +177,9 @@
+ # elif HAVE_BASIC_INT64_T==3
+ # define F_int64_t "%d"
+ # elif HAVE_BASIC_INT64_T==5
+-# define F_int64_t "%l"
++# define F_int64_t "%ld"
++# elif HAVE_BASIC_INT64_T==7
++# define F_int64_t "%lld"
+ # else
+ # error "HAVE_BASIC_INT64_T is out of range:" HAVE_BASIC_INT64_T
+ # endif
diff --git a/net-misc/socat/socat-1.7.4.0.ebuild b/net-misc/socat/socat-1.7.4.0.ebuild
index 1db0f86eaaf5..4b62fa74485a 100644
--- a/net-misc/socat/socat-1.7.4.0.ebuild
+++ b/net-misc/socat/socat-1.7.4.0.ebuild
@@ -35,6 +35,10 @@ RESTRICT="
DOCS=( BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ FILES PORTING README SECURITY )
+PATCHES=(
+ "${FILESDIR}/${P}-32bit_build_fix.patch"
+)
+
pkg_setup() {
# bug #587740
if use readline && use ssl; then