1From 3eaf11bd957555674f5993435ef79dd4717ce890 Mon Sep 17 00:00:00 2001 2From: Herve Codina <herve.codina@bootlin.com> 3Date: Tue, 26 Oct 2021 08:45:10 +0200 4Subject: [PATCH] backend: Add missing include files 5 6With some libc library (musl), shd_dev_mem.c and shd_shm.c do not 7compile. Indeed, open() needs <fcntl.h> (Cf. man open). 8 9This patch fixes the compilation issue adding this 10include file. 11 12This patch was submitted upstream. 13https://github.com/Parrot-Developers/libshdata/issues/1 14 15Signed-off-by: Herve Codina <herve.codina@bootlin.com> 16--- 17 src/backend/shd_dev_mem.c | 1 + 18 src/backend/shd_shm.c | 1 + 19 2 files changed, 2 insertions(+) 20 21diff --git a/src/backend/shd_dev_mem.c b/src/backend/shd_dev_mem.c 22index 14573c1..a65f052 100644 23--- a/src/backend/shd_dev_mem.c 24+++ b/src/backend/shd_dev_mem.c 25@@ -33,6 +33,7 @@ 26 #include <string.h> 27 #include <errno.h> 28 #include <unistd.h> /* For ftruncate */ 29+#include <fcntl.h> /* For open */ 30 #include <sys/file.h> /* for flock */ 31 #include <sys/mman.h> /* For shm and PROT flags */ 32 #include <futils/fdutils.h> 33diff --git a/src/backend/shd_shm.c b/src/backend/shd_shm.c 34index 117bf01..1e5a38c 100644 35--- a/src/backend/shd_shm.c 36+++ b/src/backend/shd_shm.c 37@@ -35,6 +35,7 @@ 38 #include <string.h> 39 #include <errno.h> 40 #include <unistd.h> /* For ftruncate */ 41+#include <fcntl.h> /* For open */ 42 #include <limits.h> /* For NAME_MAX macro */ 43 #include <sys/file.h> /* for flock */ 44 #include <sys/mman.h> /* For shm and PROT flags */ 45-- 462.31.1 47 48