From 7ff0cfef0ffe017538398d97563f99bb2f49d1f4 Mon Sep 17 00:00:00 2001 From: Laurence Parry Date: Tue, 24 Mar 2020 18:20:00 +0000 Subject: [PATCH] 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 --- ruby/ext/google/protobuf_c/wrap_memcpy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2