ntdll: Add missing stdint.h include for kfreebsd architectures.

Jens Reyer jre.winesim at gmail.com
Tue Aug 23 08:35:35 CDT 2016

From: Michael Gilbert <mgilbert at debian.org>
Signed-off-by: Jens Reyer <jre.winesim at gmail.com>
Building on kfreebsd-i386 started to fail in Debian between 1.7.42
and 1.7.44. This has been fixed by this patch since 1.7.45.

Latest relevant failed build log (1.7.44-2) from

gcc -c -o directory.o directory.c -I. -I../../include -D__WINESRC__ -D_NTSYSTEM_ -D_REENTRANT -fPIC -Wall \
  -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers \
  -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith \
  -Wlogical-op -gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer -g -O2 -fstack-protector-strong -Wformat -Werror=format-security
In file included from /usr/include/sys/vnode.h:38:0,
                 from directory.c:51:
/usr/include/sys/lock.h:64:45: error: unknown type name 'uintptr_t'
  void  (*lc_lock)(struct lock_object *lock, uintptr_t how);
/usr/include/sys/lock.h:67:2: error: expected specifier-qualifier-list before 'uintptr_t'
  uintptr_t (*lc_unlock)(struct lock_object *lock);
In file included from /usr/include/sys/lockmgr.h:35:0,
                 from /usr/include/sys/vnode.h:39,
                 from directory.c:51:
/usr/include/sys/_lockmgr.h:40:11: error: unknown type name 'uintptr_t'
  volatile uintptr_t lk_lock;
directory.c: In function 'wine_getdirentries':
directory.c:1836:46: warning: passing argument 4 of 'getdirentries' from incompatible pointer type
     int res = getdirentries(fd, buf, nbytes, basep);
In file included from directory.c:29:0:
/usr/include/dirent.h:352:18: note: expected '__off_t * __restrict__' but argument is of type 'long int *'
 extern __ssize_t getdirentries (int __fd, char *__restrict __buf,
Makefile:275: recipe for target 'directory.o' failed
make[2]: *** [directory.o] Error 1
make[2]: Leaving directory '/«PKGBUILDDIR»/dlls/ntdll'
Makefile:11206: recipe for target 'dlls/ntdll' failed
make[1]: *** [dlls/ntdll] Error 2

 dlls/ntdll/directory.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index a945e11..f3d9d94 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -53,6 +53,7 @@
 # include <sys/sysmacros.h>
+#include <stdint.h>
 /* Work around a conflict with Solaris' system list defined in sys/list.h. */
 #define list SYSLIST
 #define list_next SYSLIST_NEXT

More information about the wine-patches mailing list