File: x32.patch

package info (click to toggle)
protobuf 3.25.7-1
  • links: PTS
  • area: main
  • in suites: experimental
  • size: 46,004 kB
  • sloc: cpp: 204,412; java: 88,198; ansic: 81,264; objc: 58,434; cs: 27,303; python: 22,841; php: 11,408; ruby: 8,637; pascal: 3,333; xml: 2,333; sh: 1,331; makefile: 538; lisp: 86; awk: 17
file content (23 lines) | stat: -rw-r--r-- 933 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: fix FTBFS on x32 due to versioned glibc symbols
 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.
Author: Laurence Parry <greenreaper@gmail.com>
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: 2022-03-11

---

--- a/ruby/ext/google/protobuf_c/wrap_memcpy.c
+++ b/ruby/ext/google/protobuf_c/wrap_memcpy.c
@@ -39,7 +39,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);