0008-add-missing-FTW_-macros-for-musl.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From a0450f7909348e7ff1d58adc0aee4119a0519c1f Mon Sep 17 00:00:00 2001
  2. From: Chen Qi <Qi.Chen@windriver.com>
  3. Date: Mon, 25 Feb 2019 15:00:06 +0800
  4. Subject: [PATCH] add missing FTW_ macros for musl
  5. This is to avoid build failures like below for musl.
  6. locale-util.c:296:24: error: 'FTW_STOP' undeclared
  7. Upstream-Status: Inappropriate [musl specific]
  8. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
  9. ---
  10. src/basic/missing_type.h | 4 ++++
  11. src/test/test-recurse-dir.c | 1 +
  12. 2 files changed, 5 insertions(+)
  13. diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
  14. index 6c0456349d..73a5b90e3c 100644
  15. --- a/src/basic/missing_type.h
  16. +++ b/src/basic/missing_type.h
  17. @@ -14,3 +14,7 @@
  18. #ifndef __GLIBC__
  19. typedef int (*comparison_fn_t)(const void *, const void *);
  20. #endif
  21. +
  22. +#ifndef FTW_CONTINUE
  23. +#define FTW_CONTINUE 0
  24. +#endif
  25. diff --git a/src/test/test-recurse-dir.c b/src/test/test-recurse-dir.c
  26. index 2c2120b136..bc60a178a2 100644
  27. --- a/src/test/test-recurse-dir.c
  28. +++ b/src/test/test-recurse-dir.c
  29. @@ -6,6 +6,7 @@
  30. #include "recurse-dir.h"
  31. #include "strv.h"
  32. #include "tests.h"
  33. +#include "missing_type.h"
  34. static char **list_nftw = NULL;