From e931bb98d3ab4b67566b000395fe3c111e5f8c1e Mon Sep 17 00:00:00 2001
From: Ismael Luceno <ismael@iodev.co.uk>
Date: Mon, 8 Jun 2020 22:11:57 +0200
Subject: [PATCH] Fix missing mode_t in common.h in a strict libc

Libc implementations are allowed to require the explicit inclusion of
either <sys/types.h> (where it should be defined) or <sys/stat.h>
(prototypes requiring it) to expose mode_t.

Without that it fails to be exposed in musl libc, and potentially other
implementations.

Ref: <http://manpages.ubuntu.com/manpages/focal/man7/sys_types.h.7posix.html>

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
---
 src/common.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/common.h b/src/common.h
index 6a68fa1549c3..e38c43931e1d 100644
--- a/src/common.h
+++ b/src/common.h
@@ -29,6 +29,7 @@
 #ifndef COMMON_H
 #define COMMON_H
 
+#include <sys/types.h>
 #include <sys/param.h>
 #include <sys/time.h>
 #include <stdint.h>
-- 
2.27.0

