0001-backend-Add-missing-include-files.patch 1.5 KB

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