Add a script to install the file(1) tool
[msysgit/kusma.git] / src / file / patches / 0001-Do-not-include-headers-on-Windows-that-do-not-exist-.patch
blobc5103cfe9e1c8a3458b3dff3911f5dbfbd951726
1 From ad3ec96da42644be738aa5fcbb4a65e3a9c6284e Mon Sep 17 00:00:00 2001
2 From: Johannes Schindelin <johannes.schindelin@gmx.de>
3 Date: Mon, 7 Dec 2009 17:20:14 +0100
4 Subject: [PATCH 1/6] Do not include headers on Windows that do not exist there
6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
7 ---
8 src/compress.c | 2 ++
9 src/file.c | 2 ++
10 src/magic.c | 2 ++
11 3 files changed, 6 insertions(+), 0 deletions(-)
13 diff --git a/src/compress.c b/src/compress.c
14 index 28dacd3..b220d2e 100644
15 --- a/src/compress.c
16 +++ b/src/compress.c
17 @@ -45,7 +45,9 @@ FILE_RCSID("@(#)$File: compress.c,v 1.63 2009/03/23 14:21:51 christos Exp $")
18 #endif
19 #include <string.h>
20 #include <errno.h>
21 +#ifndef WIN32
22 #include <sys/ioctl.h>
23 +#endif
24 #ifdef HAVE_SYS_WAIT_H
25 #include <sys/wait.h>
26 #endif
27 diff --git a/src/file.c b/src/file.c
28 index 34aa44c..a7bb914 100644
29 --- a/src/file.c
30 +++ b/src/file.c
31 @@ -70,7 +70,9 @@ FILE_RCSID("@(#)$File: file.c,v 1.131 2009/02/13 18:48:05 christos Exp $")
32 int getopt_long(int argc, char * const *argv, const char *optstring, const struct option *longopts, int *longindex);
33 #endif
35 +#ifndef WIN32
36 #include <netinet/in.h> /* for byte swapping */
37 +#endif
39 #include "patchlevel.h"
41 diff --git a/src/magic.c b/src/magic.c
42 index b89989b..5a54991 100644
43 --- a/src/magic.c
44 +++ b/src/magic.c
45 @@ -57,7 +57,9 @@ FILE_RCSID("@(#)$File: magic.c,v 1.62 2009/03/20 21:25:41 christos Exp $")
46 #include <unistd.h> /* for read() */
47 #endif
49 +#ifndef WIN32
50 #include <netinet/in.h> /* for byte swapping */
51 +#endif
53 #include "patchlevel.h"
55 --
56 1.6.5.1.1371.g1abf3