diff mbox series

[ima-evm-utils] Include sys/types.h in header to fix build with musl

Message ID 20190226170910.23479-1-luca.boccassi@gmail.com (mailing list archive)
State New, archived
Headers show
Series [ima-evm-utils] Include sys/types.h in header to fix build with musl | expand

Commit Message

Luca Boccassi Feb. 26, 2019, 5:09 p.m. UTC
From: Luca Boccassi <luca.boccassi@microsoft.com>

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.

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
 src/imaevm.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/src/imaevm.h b/src/imaevm.h
index 795966a..d85db0d 100644
--- a/src/imaevm.h
+++ b/src/imaevm.h
@@ -44,6 +44,7 @@ 
 #include <linux/fs.h>
 #include <stdint.h>
 #include <syslog.h>
+#include <sys/types.h>
 #include <stdbool.h>
 #include <errno.h>