summaryrefslogtreecommitdiffstats
path: root/package/lirc-tools/0001-lib-curl_poll.h-fix-header-guard-collision-with-musl.patch
blob: a5cb7f35a03abd13f1c6e716f356a1b001a281ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
From: Baruch Siach <baruch@tkos.co.il>
Subject: [PATCH] lib/curl_poll.h: fix header guard collision with musl libc

The musl libc uses the _POLL_H macro as a double include guard for the poll.h
header. This breaks compilation of files the include curl_poll.h:

In file included from driver.h:32:0,
                 from driver.c:12:
lirc/curl_poll.h:38:29: error: array type has incomplete element type ‘struct pollfd’
 int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
                             ^~~~

Rename the curl_poll.h header guard macro to avoid collision. Don't use a name
that starts with an underscore and a capital letter since these names are
reserved according to the ANSI C standard.

https://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html

[ This patch is based on upstream, but changes also another copy of
  curl_poll.h under lib/lirc/ ]

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
Patch status: upstream
https://sourceforge.net/p/lirc/git/ci/e07a80aa00a14fc98d7347afa1fa44282732b27f/

diff --git lirc-0.9.4d-orig/lib/curl_poll.h lirc-0.9.4d/lib/curl_poll.h
index af25381b3e26..1e895aa62f93 100644
--- lirc-0.9.4d-orig/lib/curl_poll.h
+++ lirc-0.9.4d/lib/curl_poll.h
@@ -1,5 +1,5 @@
-#ifndef _POLL_H
-#define _POLL_H
+#ifndef HEADER_LIB_CURL_POLL_H
+#define HEADER_LIB_CURL_POLL_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -42,4 +42,4 @@ int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
 #endif
 
 
-#endif /* _POLL_H */
+#endif /* HEADER_LIB_CURL_POLL_H */
diff --git lirc-0.9.4d-orig/lib/lirc/curl_poll.h lirc-0.9.4d/lib/lirc/curl_poll.h
index af25381b3e26..1e895aa62f93 100644
--- lirc-0.9.4d-orig/lib/lirc/curl_poll.h
+++ lirc-0.9.4d/lib/lirc/curl_poll.h
@@ -1,5 +1,5 @@
-#ifndef _POLL_H
-#define _POLL_H
+#ifndef HEADER_LIB_CURL_POLL_H
+#define HEADER_LIB_CURL_POLL_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -42,4 +42,4 @@ int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
 #endif
 
 
-#endif /* _POLL_H */
+#endif /* HEADER_LIB_CURL_POLL_H */
OpenPOWER on IntegriCloud