Skip to contentSkip to conversation

Include sys/types.h in header to fix build with musl

PATCH New [email protected] 1 participant 1 message Feb 26, 2019 Keys-trusted

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Include sys/types.h in header to fix build with musl

From: Luca Boccassi <[email protected]>

Building a third program that depends on libimaevm with musl fails, as the imaevm.h uses uid_t and gid_t without including sys/types.h:

<..>/sysroot/usr/include/imaevm.h:90:2: error: unknown type name 'uid_t'
uid_t uid;

Including sys/types.h fixes building with musl and does not affect building with glibc.

---
 src/imaevm.h | 1 +
 1 file changed, 1 insertion(+)
src/imaevm.h +1 -0
index 795966a..d85db0d 100644
@@ -44,6 +44,7 @@
 #include <linux/fs.h>
 #include <stdint.h>
 #include <syslog.h>
+#include <sys/types.h>
 #include <stdbool.h>
 #include <errno.h>
 
Signature · 1 line
2.20.1