aboutsummaryrefslogtreecommitdiffstats
path: root/ports/linux/portdefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'ports/linux/portdefs.h')
-rw-r--r--ports/linux/portdefs.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ports/linux/portdefs.h b/ports/linux/portdefs.h
index 20ad529..60a8cc1 100644
--- a/ports/linux/portdefs.h
+++ b/ports/linux/portdefs.h
@@ -11,3 +11,17 @@
* causes errors; you have to leave it empty or specify AT_SYMLINK_FOLLOW.
*/
#define PSEUDO_LINK_SYMLINK_BEHAVIOR 0
+
+/* There were symbol changes that can cause the linker to request
+ * newer versions of glibc, which causes problems occasionally on
+ * older hosts if pseudo is built against a newer glibc and then
+ * run with an older one. Sometimes we can just avoid the symbols,
+ * but memcpy's pretty hard to get away from.
+ */
+#define GLIBC_COMPAT_SYMBOL(sym, ver) __asm(".symver " #sym "," #sym "@GLIBC_" #ver)
+
+#ifdef __amd64__
+GLIBC_COMPAT_SYMBOL(memcpy,2.2.5);
+#else /* tentatively assume this means x86 */
+GLIBC_COMPAT_SYMBOL(memcpy,2.0);
+#endif