gpio: add feature test macro for POLLRDNORM

The code needs _XOPEN_SOURCE for some poll() flags.

Fix build with uclibc:
src/gpio.c: In function gpio_poll_multiple»:
src/gpio.c:242:61: error: «POLLRDNORM» undeclared (first use in this function)
(POLLPRI | POLLERR) : (POLLIN | POLLRDNORM);
                                ^

closes #24.

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Signed-off-by: Vanya A. Sergeev <v@sergeev.io>
This commit is contained in:
Joris Offouga
2020-05-29 13:48:58 +02:00
committed by Vanya A. Sergeev
parent a750f96355
commit cfc722e518

View File

@@ -4,6 +4,8 @@
* License: MIT
*/
#define _XOPEN_SOURCE /* for POLLRDNORM */
#include <stddef.h>
#include <stdbool.h>
#include <stdarg.h>