fix FTBFS on x32 due to versioned glibc symbols
authorLaurence Parry <greenreaper@gmail.com>
Tue, 24 Mar 2020 18:20:00 +0000 (18:20 +0000)
committerLaszlo Boszormenyi (GCS) <gcs@debian.org>
Tue, 24 Mar 2020 18:20:00 +0000 (18:20 +0000)
Origin: other, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931503#5
Forwarded: not-needed
Bug-Debian: https://bugs.debian.org/931503
Last-Update: 2019-08-06

protobuf assumes that glibc 2.2.5 memcpy symbols will be available #if
defined(__x86-64__); however, x32 also defines this, but was not
supported prior to 2.16.

Gbp-Pq: Name x32.patch

ruby/ext/google/protobuf_c/wrap_memcpy.c

index 18c036780cdd551381d6031b92f38789409bf149..d581a325dbe5a9a8862f89a0ba1f1d47f592c2ff 100644 (file)
@@ -38,7 +38,7 @@
 // This wrapper is enabled by passing the linker flags -Wl,-wrap,memcpy in
 // extconf.rb.
 #ifdef __linux__
-#if defined(__x86_64__) && defined(__GNU_LIBRARY__)
+#if defined(__x86_64__) && !defined(__ILP32__) && defined(__GNU_LIBRARY__)
 __asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
 void *__wrap_memcpy(void *dest, const void *src, size_t n) {
     return memcpy(dest, src, n);