shibboleth-sp: fix build for Clang >=19 (#407919)

authored by

Atemu and committed by
GitHub
b7407d86 ee303125

+21
+21
pkgs/by-name/sh/shibboleth-sp/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchgit, 5 + fetchpatch, 5 6 autoreconfHook, 6 7 boost, 7 8 fcgi, ··· 23 24 rev = version; 24 25 sha256 = "1qb4dbz5gk10b9w1rf6f4vv7c2wb3a8bfzif6yiaq96ilqad7gdr"; 25 26 }; 27 + 28 + # Upgrade to Clang 19 (and thereby LLVM19) causes `std::char_traits` to now be present, 29 + # making `char_traits` references ambiguous due to both `std` and `xmltooling` exporting this symbol, 30 + # and the file in question uses both `using namespace std;` and `using namespace xmltooling;` 31 + # The patches below result in `xmltooling` being removed. 32 + # As `char_traits` is a compile time construct, no runtime repercussions can stem from this. 33 + # See https://shibboleth.atlassian.net/browse/SSPCPP-998 for a related discussion. 34 + patches = lib.optionals (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "19") [ 35 + (fetchpatch { 36 + name = "char-traits-ambig-1"; 37 + url = "https://git.shibboleth.net/view/?p=cpp-sp.git;a=blobdiff_plain;f=shibsp/util/IPRange.cpp;h=532cf9e94c915667c091d127c696979f63939eb5;hp=d6f00bc36ea25997817a2308314bcdbea572936f;hb=49cd05fa6d9935a45069fa555db7a26ca77d23db;hpb=293ff2ab6454b0946b3b03719efa132bff461f1f"; 38 + hash = "sha256-ZF0jsZJoHaxaPPjVbT6Wlq+wjyPQLTnEKcUxONji/hE="; 39 + }) 40 + 41 + (fetchpatch { 42 + name = "char-traits-ambig-2"; 43 + url = "https://git.shibboleth.net/view/?p=cpp-sp.git;a=blobdiff_plain;f=shibsp/util/IPRange.cpp;h=da954870eb03c7cd054ecc5c52a6c1f011787760;hp=354010d5f5e533262cb385ea16756df53fe0c241;hb=793663a67aaa4e9a4aa9172728d924f8cec45cf6;hpb=a43814935030930c49b7a08f5515b861906525c7"; 44 + hash = "sha256-4iGwCGpGwAkriOwQmh5AgvHLX1o39NuQ2l4sAJbD2bc="; 45 + }) 46 + ]; 26 47 27 48 nativeBuildInputs = [ 28 49 autoreconfHook