From 06900749637b925af1ebdf5030ba03a379f4f84f Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Thu, 22 Jan 2015 17:16:59 -0800 Subject: Fix error: conflicting types for ‘pid_t’ with mingw64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using x86_64-w64-mingw32-gcc cross-compiler for win64 gives an error: ``` In file included from include/libbb.h:163:0, from include/busybox.h:8, from applets/applets.c:9: include/mingw.h:10:13: error: conflicting types for ‘pid_t’ typedef int pid_t; ^ In file included from /usr/share/mingw-w64/include/process.h:12:0, from /usr/share/mingw-w64/include/unistd.h:11, from include/platform.h:313, from include/libbb.h:13, from include/busybox.h:8, from applets/applets.c:9: /usr/share/mingw-w64/include/sys/types.h:68:16: note: previous declaration of ‘pid_t’ was here typedef _pid_t pid_t; ^ make[1]: *** [applets/applets.o] Error 1 ``` This change fixes it and results in a successful build of 64-bit busybox.exe. --- include/mingw.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/mingw.h b/include/mingw.h index 12c5ef71d..090dd1776 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -7,7 +7,11 @@ */ typedef int gid_t; typedef int uid_t; +#ifndef _WIN64 typedef int pid_t; +#else +typedef __int64 pid_t; +#endif /* * arpa/inet.h -- cgit v1.2.3-55-g6feb