From: Laurence Parry Date: Tue, 24 Mar 2020 18:20:00 +0000 (+0000) Subject: fix FTBFS on x32 due to versioned glibc symbols X-Git-Tag: archive/raspbian/3.11.4-3+rpi1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7ff0cfef0ffe017538398d97563f99bb2f49d1f4;p=protobuf.git fix FTBFS on x32 due to versioned glibc symbols 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 --- diff --git a/ruby/ext/google/protobuf_c/wrap_memcpy.c b/ruby/ext/google/protobuf_c/wrap_memcpy.c index 18c0367..d581a32 100644 --- a/ruby/ext/google/protobuf_c/wrap_memcpy.c +++ b/ruby/ext/google/protobuf_c/wrap_memcpy.c @@ -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);