This is an alternative to a patch by Esben Haabendal, titled "Fix MinGW builds by adding MKDIR_TAKES_ONE_ARG", posted on Feb 23. Esben's patch made "private.h" optionally include <sys/stat.h> to get at Microsoft's mkdir function, but I think that only works in MinGW, and relies on MinGW's <io.h> header (included by <sys/stat.h>) optionally declaring the mkdir function. The mkdir function is also deprecated by Microsoft. New code should call _mkdir instead. Both functions only take a single parameter. This patch makes "private.h" optionally include <direct.h> (and also <io.h>, due to MinGW's behavior), controlled by the HAVE_DIRECT_H macro, and defines mkdir(path, mode) as macro calling _mkdir(path). With this patch, tz builds successfully in a MSYS2 MingW-w64 Win32 or Win64 environment using the following command line: make CFLAGS="-DHAVE_SYS_WAIT_H=0 -DHAVE_DIRECT_H=1 -DHAVE_LINK=0 -DHAVE_SYMLINK=0 -DHAVE_LOCALTIME_R=0" There are some warnings about 'tzname' being redeclared without dllimport attribute, when compiling zdump.c and localtime.c, but the resulting zdump executable seems to work. -- -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-