syslog-ng: Bump version to 3.7.3
[buildroot-gz.git] / package / sane-backends / 0002-Add-missing-sys-types.h-includes.patch
blob8ab41f1fef8664306f3849b5b95f9cc4288c72aa
1 From d33f16f463e888846d69ddfbeeb963d40972b654 Mon Sep 17 00:00:00 2001
2 From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
3 Date: Thu, 15 Oct 2015 12:35:00 +0900
4 Subject: [PATCH] Add missing <sys/types.h> includes
6 [Thomas: backport from upstream commit
7 33495ef9b42a783c8f5f2c056ac5699481d3cc7e, allows to fix the build with
8 the musl C library.]
9 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 ---
11 backend/epsonds-io.c | 3 +++
12 backend/hp5400.c | 3 +++
13 backend/hp5590.c | 3 +++
14 backend/kvs20xx_cmd.h | 4 ++++
15 backend/kvs40xx.h | 3 +++
16 include/sane/sanei_udp.h | 3 +++
17 6 files changed, 19 insertions(+)
19 diff --git a/backend/epsonds-io.c b/backend/epsonds-io.c
20 index 28bacfc..512997d 100644
21 --- a/backend/epsonds-io.c
22 +++ b/backend/epsonds-io.c
23 @@ -16,6 +16,9 @@
24 #include "sane/config.h"
25 #include <ctype.h>
26 #include <unistd.h> /* sleep */
27 +#ifdef HAVE_SYS_TYPES_H
28 +#include <sys/types.h>
29 +#endif
31 #include "epsonds.h"
32 #include "epsonds-io.h"
33 diff --git a/backend/hp5400.c b/backend/hp5400.c
34 index 61de3db..cfa2dc9 100644
35 --- a/backend/hp5400.c
36 +++ b/backend/hp5400.c
37 @@ -67,6 +67,9 @@
38 #include <stdlib.h> /* malloc, free */
39 #include <string.h> /* memcpy */
40 #include <stdio.h>
41 +#ifdef HAVE_SYS_TYPES_H
42 +#include <sys/types.h>
43 +#endif
46 #define HP5400_CONFIG_FILE "hp5400.conf"
47 diff --git a/backend/hp5590.c b/backend/hp5590.c
48 index 7b1cd60..5422372 100644
49 --- a/backend/hp5590.c
50 +++ b/backend/hp5590.c
51 @@ -48,6 +48,9 @@
52 #include <stdio.h>
53 #include <string.h>
54 #include <unistd.h>
55 +#ifdef HAVE_SYS_TYPES_H
56 +#include <sys/types.h>
57 +#endif
59 #include "../include/sane/sane.h"
60 #define BACKEND_NAME hp5590
61 diff --git a/backend/kvs20xx_cmd.h b/backend/kvs20xx_cmd.h
62 index c18b754..4acaf62 100644
63 --- a/backend/kvs20xx_cmd.h
64 +++ b/backend/kvs20xx_cmd.h
65 @@ -9,6 +9,10 @@
66 Panasonic KV-S20xx USB-SCSI scanners.
69 +#ifdef HAVE_SYS_TYPES_H
70 +#include <sys/types.h>
71 +#endif
73 #define COMMAND_BLOCK 1
74 #define DATA_BLOCK 2
75 #define RESPONSE_BLOCK 3
76 diff --git a/backend/kvs40xx.h b/backend/kvs40xx.h
77 index fa17163..02e0da6 100644
78 --- a/backend/kvs40xx.h
79 +++ b/backend/kvs40xx.h
80 @@ -10,6 +10,9 @@
82 #include "../include/sane/config.h"
83 #include <semaphore.h>
84 +#ifdef HAVE_SYS_TYPES_H
85 +#include <sys/types.h>
86 +#endif
88 #undef BACKEND_NAME
89 #define BACKEND_NAME kvs40xx
90 diff --git a/include/sane/sanei_udp.h b/include/sane/sanei_udp.h
91 index c44afdd..e32fc1a 100644
92 --- a/include/sane/sanei_udp.h
93 +++ b/include/sane/sanei_udp.h
94 @@ -27,6 +27,9 @@
95 #include <netinet/in.h>
96 #include <netdb.h>
97 #endif
98 +#ifdef HAVE_SYS_TYPES_H
99 +#include <sys/types.h>
100 +#endif
102 extern SANE_Status sanei_udp_open(const char *host, int port, int *fdp);
103 extern SANE_Status sanei_udp_open_broadcast(int *fdp);
105 2.7.4