[PATCH] lib/curl_poll.h: fix header guard collision with musl libc
Baruch Siach <[email protected]>
| Newsgroups | gmane.comp.hardware.lirc |
|---|---|
| Message-ID | <85a8052e9834b750c6f5d66185b746fdbd02c775.1498232104.git.baruch@tkos.co.il> |
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
Signed-off-by: Baruch Siach <[email protected]>
---
lib/curl_poll.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/curl_poll.h b/lib/curl_poll.h
index c8813859eca6..c0162b66718b 100644
--- a/lib/curl_poll.h
+++ b/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 ___| | | | _ \| |
@@ -44,4 +44,4 @@ int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
#endif
-#endif /* _POLL_H */
+#endif /* HEADER_LIB_CURL_POLL_H */
--
2.11.0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot