line 52 of w32/npth.h may be better:
#if (MINGW64_VERSION_MAJOR < 2) && (MINGW32__ != 1)
instead of just checking for __MINGW64_VERSION_MAJOR < 2.
struct timespec is already defined here.
gcc --version:
4.8.1
$ gcc -dM -E - < /dev/null | grep -i mingw:
#define MINGW32 1
time.h,v 43b5fbe8586e 2014/12/23 20:59:37
error log:
In file included from call-gpg.c:25:0:
C:/MinGW/msys/1.0/home/x/w32root/include/npth.h:53:8: error: redefinition of 's
truct timespec'
struct timespec {
^
In file included from c:\mingw\include\unistd.h:95:0,
from C:/MinGW/msys/1.0/home/x/w32root/include/assuan.h:28, from call-gpg.c:23:
c:\mingw\include\parts\time.h:65:8: note: originally defined here
struct timespec
^
make[3]: * [libcommon_a-call-gpg.o] Error 1
make[3]: Leaving directory `/c/d/gnupg-2.1.10.tar/gnupg-2.1.10/common'
make[2]: * [all] Error 2
make[2]: Leaving directory `/c/d/gnupg-2.1.10.tar/gnupg-2.1.10/common'
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory `/c/d/gnupg-2.1.10.tar/gnupg-2.1.10'
make: * [all] Error 2