Skip to content

Commit efe3f94

Browse files
shenkigregkh
authored andcommitted
tools/gpio: Fix build error with musl libc
commit 1696784 upstream. The GPIO tools build fails when using a buildroot toolchain that uses musl as it's C library: arm-broomstick-linux-musleabi-gcc -Wp,-MD,./.gpio-event-mon.o.d \ -Wp,-MT,gpio-event-mon.o -O2 -Wall -g -D_GNU_SOURCE \ -Iinclude -D"BUILD_STR(s)=#s" -c -o gpio-event-mon.o gpio-event-mon.c gpio-event-mon.c:30:6: error: unknown type name ‘u_int32_t’; did you mean ‘uint32_t’? u_int32_t handleflags, ^~~~~~~~~ uint32_t The glibc headers installed on my laptop include sys/types.h in unistd.h, but it appears that musl does not. Fixes: 97f6974 ("tools/gpio: add the gpio-event-mon tool") Signed-off-by: Joel Stanley <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2a7076e commit efe3f94

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/gpio/gpio-event-mon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <getopt.h>
2424
#include <inttypes.h>
2525
#include <sys/ioctl.h>
26+
#include <sys/types.h>
2627
#include <linux/gpio.h>
2728

2829
int monitor_device(const char *device_name,

0 commit comments

Comments
 (0)