0001-shm.c-use-_Static_assert-instead-of-static_assert-fo.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. From fb39f9600d464ce761917c0e787b940097f6024c Mon Sep 17 00:00:00 2001
  2. From: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
  3. Date: Thu, 23 Jun 2022 16:52:49 +0200
  4. Subject: [PATCH] shm.c: use _Static_assert instead of static_assert for uclibc
  5. Both are C11 constructs. The first one is defined by the compiler in
  6. gnu11 mode, but the second one should be a macro defined in assert.h
  7. The macro exists in glibc >= 2.16 and musl >= 1.1.10 but not in
  8. uclibc 1.0.41. It is expected to be present in uclibc 1.0.42.
  9. Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
  10. ---
  11. src/pulsecore/shm.c | 2 +-
  12. 1 file changed, 1 insertion(+), 1 deletion(-)
  13. diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c
  14. index e464f6bce..5220cc90d 100644
  15. --- a/src/pulsecore/shm.c
  16. +++ b/src/pulsecore/shm.c
  17. @@ -94,7 +94,7 @@ struct shm_marker {
  18. };
  19. // Ensure struct is appropriately packed
  20. -static_assert(sizeof(struct shm_marker) == 8 * 5, "`struct shm_marker` is not tightly packed");
  21. +_Static_assert(sizeof(struct shm_marker) == 8 * 5, "`struct shm_marker` is not tightly packed");
  22. static inline size_t shm_marker_size(pa_mem_type_t type) {
  23. if (type == PA_MEM_TYPE_SHARED_POSIX)
  24. --
  25. 2.36.1