From b3774862952b27e3513b3ef82414d56bcae3b665 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 20 Apr 2023 02:29:26 +0200 Subject: chown tests: Fix link error on mingw 10. * modules/chown-tests (configure.ac): Test whether getgid() exists. * modules/fchownat-tests (configure.ac): Likewise. * tests/test-chown.h (getgid): Define a fallback. --- tests/test-chown.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/test-chown.h b/tests/test-chown.h index 4c7b6eec33..4e3d417d1b 100644 --- a/tests/test-chown.h +++ b/tests/test-chown.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 -- cgit v1.2.1