summaryrefslogtreecommitdiffstats
path: root/package/lirc-tools/0001-lib-curl_poll.h-fix-header-guard-collision-with-musl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/lirc-tools/0001-lib-curl_poll.h-fix-header-guard-collision-with-musl.patch')
-rw-r--r--package/lirc-tools/0001-lib-curl_poll.h-fix-header-guard-collision-with-musl.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/package/lirc-tools/0001-lib-curl_poll.h-fix-header-guard-collision-with-musl.patch b/package/lirc-tools/0001-lib-curl_poll.h-fix-header-guard-collision-with-musl.patch
new file mode 100644
index 0000000000..a5cb7f35a0
--- /dev/null
+++ b/package/lirc-tools/0001-lib-curl_poll.h-fix-header-guard-collision-with-musl.patch
@@ -0,0 +1,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