From 6da40d7ad4c1e26bb805a20ce7d301f1b708645d Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 3 Apr 2022 01:13:04 +0200 Subject: [PATCH] Workaround for newer glibc, linking against libraries build on older versons results in missing symbols. --- indra/newview/llappviewerlinux.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index 99716e9ede..a09e0dbb40 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -40,10 +40,29 @@ #include -#include "json/reader.h" // To parse manifest.json from pepperflash - - #include +#include + +#if (__GLIBC__*1000 + __GLIBC_MINOR__) >= 2034 +#pragma message "Compiling with libresolv stubs" +extern "C" +{ + int __res_nquery(res_state statep, + const char *dname, int qclass, int type, + unsigned char *answer, int anslen) + { + return res_nquery( statep, dname, qclass, type, answer, anslen ); + } + + int __dn_expand(const unsigned char *msg, + const unsigned char *eomorig, + const unsigned char *comp_dn, char *exp_dn, + int length) + { + return dn_expand( msg,eomorig,comp_dn,exp_dn,length); + } +} +#endif #if LL_SEND_CRASH_REPORTS #include "breakpad/client/linux/handler/exception_handler.h"