GNU M4: Have a test work around flaws in newer Linux versions.
svn path=/nixpkgs/branches/stdenv-updates/; revision=29856
This commit is contained in:
parent
8dfef0f4a0
commit
383baf8794
@ -11,7 +11,7 @@ stdenv.mkDerivation {
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
# Upstream is aware of it; it may be in the next release.
|
||||
patches = [ ./s_isdir.patch ];
|
||||
patches = [ ./s_isdir.patch ./readlink-EINVAL.patch ];
|
||||
|
||||
meta = {
|
||||
homepage = http://www.gnu.org/software/m4/;
|
||||
|
18
pkgs/development/tools/misc/gnum4/readlink-EINVAL.patch
Normal file
18
pkgs/development/tools/misc/gnum4/readlink-EINVAL.patch
Normal file
@ -0,0 +1,18 @@
|
||||
Newer Linux kernels would return EINVAL instead of ENOENT.
|
||||
The patch below, taken from Gnulib, allows the test to pass when
|
||||
these Linux versions are in use:
|
||||
https://lists.gnu.org/archive/html/bug-gnulib/2011-03/msg00308.html .
|
||||
|
||||
diff --git a/tests/test-readlink.h b/tests/test-readlink.h
|
||||
index 08d5662..7247fc4 100644
|
||||
--- a/tests/test-readlink.h
|
||||
+++ b/tests/test-readlink.h
|
||||
@@ -38,7 +38,7 @@ test_readlink (ssize_t (*func) (char const *, char *, size_t), bool print)
|
||||
ASSERT (errno == ENOENT);
|
||||
errno = 0;
|
||||
ASSERT (func ("", buf, sizeof buf) == -1);
|
||||
- ASSERT (errno == ENOENT);
|
||||
+ ASSERT (errno == ENOENT || errno == EINVAL);
|
||||
errno = 0;
|
||||
ASSERT (func (".", buf, sizeof buf) == -1);
|
||||
ASSERT (errno == EINVAL);
|
Loading…
Reference in New Issue
Block a user