summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-04-20 02:51:43 +0200
committerBruno Haible <bruno@clisp.org>2023-04-20 02:51:43 +0200
commite5eacca5e2ee869d6e622f54d9a0309bc87f8254 (patch)
tree97b77af2e67de3f372de7f87edc0b4522e852d97 /tests
parentb3774862952b27e3513b3ef82414d56bcae3b665 (diff)
downloadgnulib-e5eacca5e2ee869d6e622f54d9a0309bc87f8254.tar.gz
chown, lchown tests: Fix link error on mingw 10.
* modules/chown-tests (configure.ac): Test whether getgid() exists. * modules/lchown-tests (configure.ac): Likewise. * modules/fchownat-tests (configure.ac): Likewise. * tests/test-chown.h (getgid): Define a fallback. * tests/test-lchown.h (getgid): Likewise.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-lchown.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test-lchown.h b/tests/test-lchown.h
index 1c68f4a1ba..3f5d0bc54c 100644
--- a/tests/test-lchown.h
+++ b/tests/test-lchown.h
@@ -18,6 +18,10 @@
#include "nap.h"
+#if !HAVE_GETGID
+# define getgid() ((gid_t) -1)
+#endif
+
#if !HAVE_GETEGID
# define getegid() ((gid_t) -1)
#endif