kumquat-buildroot/package/lirc-tools/0001-lib-curl_poll.h-fix-header-guard-collision-with-musl.patch

63 lines
2.3 KiB
Diff
Raw Normal View History

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 */