Merge pull request #196283 from lheckemann/fix-libowfat

libowfat: fix build with glibc 2.34
This commit is contained in:
Linus Heckemann 2022-10-19 01:56:18 +02:00 committed by GitHub
commit b459fda544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,16 @@ stdenv.mkDerivation rec {
sha256 = "1hcqg7pvy093bxx8wk7i4gvbmgnxz2grxpyy7b4mphidjbcv7fgl";
};
# Fix for glibc 2.34 from Gentoo
# https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=914a4aa87415dabfe77181a2365766417a5919a4
postPatch = ''
# do not define "__pure__", this the gcc builtin (bug #806505)
sed 's#__pure__;#__attribute__((__pure__));#' -i fmt.h scan.h byte.h stralloc.h str.h critbit.h || die
sed 's#__pure__$#__attrib__pure__#' -i fmt.h scan.h byte.h stralloc.h str.h critbit.h || die
# remove unneeded definition of __deprecated__
sed '/^#define __deprecated__$/d' -i scan/scan_iso8601.c scan/scan_httpdate.c || die
'';
makeFlags = [ "prefix=$(out)" ];
enableParallelBuilding = true;
@ -17,8 +27,5 @@ stdenv.mkDerivation rec {
homepage = "https://www.fefe.de/libowfat/";
license = licenses.gpl2;
platforms = platforms.linux;
# Doesn't build with glibc 2.34: https://hydra.nixos.org/build/156248131
# Should be fixed with the next release: https://bugs.gentoo.org/806505
broken = true;
};
}