From 28d992bf6de10f8680d478d72daa41629c54b677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 26 Feb 2014 15:56:06 +0100 Subject: [PATCH] checkinstall: fix build with glibc-2.19 --- .../checkinstall/default.nix | 3 +++ .../checkinstall/readlink-types.patch | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/tools/package-management/checkinstall/readlink-types.patch diff --git a/pkgs/tools/package-management/checkinstall/default.nix b/pkgs/tools/package-management/checkinstall/default.nix index 2fbf5282ee12..1320720ed170 100644 --- a/pkgs/tools/package-management/checkinstall/default.nix +++ b/pkgs/tools/package-management/checkinstall/default.nix @@ -29,6 +29,9 @@ stdenv.mkDerivation { # Fix a `conflicting types for 'scandir'' error on Glibc 2.11. ./scandir.patch + + # Fix a `conflicting types for 'readlink'' error since Glibc 2.19 + ./readlink-types.patch ] ++ stdenv.lib.optional (stdenv.system == "x86_64-linux") diff --git a/pkgs/tools/package-management/checkinstall/readlink-types.patch b/pkgs/tools/package-management/checkinstall/readlink-types.patch new file mode 100644 index 000000000000..a860607fcf66 --- /dev/null +++ b/pkgs/tools/package-management/checkinstall/readlink-types.patch @@ -0,0 +1,19 @@ +Extracted from Arch's patch +https://projects.archlinux.org/svntogit/community.git/tree/trunk/build-fix.patch?h=packages/checkinstall +diff -wbBur checkinstall-1.6.2/installwatch/installwatch.c checkinstall-1.6.2.my/installwatch/installwatch.c +--- checkinstall-1.6.2/installwatch/installwatch.c 2008-11-16 19:20:53.000000000 +0300 ++++ checkinstall-1.6.2.my/installwatch/installwatch.c 2010-01-15 18:55:50.112716628 +0300 +@@ -2938,13 +2938,8 @@ + return result; + } + +-#if (GLIBC_MINOR <= 4) +-int readlink(const char *path,char *buf,size_t bufsiz) { +- int result; +-#else + ssize_t readlink(const char *path,char *buf,size_t bufsiz) { + ssize_t result; +-#endif + instw_t instw; + int status; +