uqm: Fix build against glibc 2.26
I've bisected the introduction of the build failure to be the glibc 2.26 upgrade with commit 9bb67d5c1e546968fa3d195f0bcad82414243566. At first I was somewhat stumped why an glibc update could cause undeclared identifiers, but after looking at the changes of glibc and the source code of The Ur-Quan Masters the problem quickly turned out to be this very change: https://sourceware.org/git/?p=glibc.git;a=commit;h=7b037c095e31c2396d0a9b0e6356bc566ee4812f So string.h now in turn includes strings.h, which in theory wouldn't be a problem. However, both strings.h and the strings.h in the uqm source code use constant _STRINGS_H, which causes the glibc strings.h to be included but the one from uqm basically includes an empty file. Signed-off-by: aszlig <aszlig@nix.build>
This commit is contained in:
parent
3429d8cbbf
commit
7603da33de
@ -70,6 +70,11 @@ in stdenv.mkDerivation rec {
|
||||
ln -s "${videos}" "uqm-${version}/content/addons/3dovideo"
|
||||
'';
|
||||
|
||||
# Using _STRINGS_H as include guard conflicts with glibc.
|
||||
postPatch = ''
|
||||
sed -i -e '/^#/s/_STRINGS_H/_UQM_STRINGS_H/g' src/uqm/comm/*/strings.h
|
||||
'';
|
||||
|
||||
# uqm has a 'unique' build system with a root script incidentally called
|
||||
# 'build.sh'.
|
||||
configurePhase = ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user