]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
_getcwd() on Windows needs direct.h header
authorOndřej Surý <ondrej@isc.org>
Thu, 16 Apr 2020 11:13:00 +0000 (13:13 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 16 Apr 2020 11:13:00 +0000 (13:13 +0200)
The _getcwd() compatibility function on Microsoft CRT requires direct.h
header to pull a proper function prototype.

The (misleading) warning generated:

  bin\named\server.c(1074): warning C4047: '==': 'int' differs in levels of indirection from 'void *'

lib/isc/win32/include/isc/dir.h

index 34e945a30f48606d10ec7e4a10e6a34bfa115371..53bc5dc412b3fc959052144189cd7fa7bfe652ef 100644 (file)
@@ -15,6 +15,7 @@
 #include <windows.h>
 #include <stdbool.h>
 #include <stdlib.h>
+#include <direct.h>
 
 #include <isc/lang.h>
 #include <isc/platform.h>