From 7603da33decd2f3777306729d2a95c091b7801ab Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 8 Nov 2017 06:33:21 +0100 Subject: 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 --- pkgs/games/uqm/default.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkgs/games/uqm') diff --git a/pkgs/games/uqm/default.nix b/pkgs/games/uqm/default.nix index 22a0418d4cad..1a2afa29f8f1 100644 --- a/pkgs/games/uqm/default.nix +++ b/pkgs/games/uqm/default.nix @@ -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 = '' -- cgit 1.4.1