buildroot/package/libshdata/0001-backend-Add-missing-include-files.patch
Herve Codina d1e8f787e9 package/libshdata: new package
The libshdata library provides lock free shared-memory tools.

https://github.com/Parrot-Developers/libshdata

libshdata-stress utility does not compile using static libs
only (BR2_STATIC_LIBS=y). The issue was raised upstream:
  https://github.com/Parrot-Developers/libshdata/issues/2
For now, libshdata-stress simply depends on !BR2_STATIC_LIBS.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
[yann.morin.1998@free.fr:
  - do not macro-ify headers install
  - do not parameterise static libs install dest
  - do not parameterise binaries install dest
  - reorder macros decaration and use
  - remove spurious comma between module dependencies
  - implicit module name
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-12 00:29:54 +01:00

48 lines
1.5 KiB
Diff

From 3eaf11bd957555674f5993435ef79dd4717ce890 Mon Sep 17 00:00:00 2001
From: Herve Codina <herve.codina@bootlin.com>
Date: Tue, 26 Oct 2021 08:45:10 +0200
Subject: [PATCH] backend: Add missing include files
With some libc library (musl), shd_dev_mem.c and shd_shm.c do not
compile. Indeed, open() needs <fcntl.h> (Cf. man open).
This patch fixes the compilation issue adding this
include file.
This patch was submitted upstream.
https://github.com/Parrot-Developers/libshdata/issues/1
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
src/backend/shd_dev_mem.c | 1 +
src/backend/shd_shm.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/backend/shd_dev_mem.c b/src/backend/shd_dev_mem.c
index 14573c1..a65f052 100644
--- a/src/backend/shd_dev_mem.c
+++ b/src/backend/shd_dev_mem.c
@@ -33,6 +33,7 @@
#include <string.h>
#include <errno.h>
#include <unistd.h> /* For ftruncate */
+#include <fcntl.h> /* For open */
#include <sys/file.h> /* for flock */
#include <sys/mman.h> /* For shm and PROT flags */
#include <futils/fdutils.h>
diff --git a/src/backend/shd_shm.c b/src/backend/shd_shm.c
index 117bf01..1e5a38c 100644
--- a/src/backend/shd_shm.c
+++ b/src/backend/shd_shm.c
@@ -35,6 +35,7 @@
#include <string.h>
#include <errno.h>
#include <unistd.h> /* For ftruncate */
+#include <fcntl.h> /* For open */
#include <limits.h> /* For NAME_MAX macro */
#include <sys/file.h> /* for flock */
#include <sys/mman.h> /* For shm and PROT flags */
--
2.31.1