projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't assume that EOPNOTSUPP exists.
[gnulib.git]
/
tests
/
test-link.c
diff --git
a/tests/test-link.c
b/tests/test-link.c
index
a358921
..
250a821
100644
(file)
--- a/
tests/test-link.c
+++ b/
tests/test-link.c
@@
-46,10
+46,17
@@
main (int argc, char **argv)
{
/* If the device does not support hard links, errno is
EPERM on Linux, EOPNOTSUPP on FreeBSD. */
{
/* If the device does not support hard links, errno is
EPERM on Linux, EOPNOTSUPP on FreeBSD. */
- if (errno == EPERM || errno == EOPNOTSUPP)
- return 77;
- perror ("link");
- return 1;
+ switch (errno)
+ {
+ case EPERM:
+#ifdef EOPNOTSUPP
+ case EOPNOTSUPP:
+#endif
+ return 77;
+ default:
+ perror ("link");
+ return 1;
+ }
}
return 0;
}
return 0;