tools: mtd-utils: fix patch 110 for musl
authorMario Andrés Pérez <[email protected]>
Wed, 26 Nov 2025 00:40:28 +0000 (01:40 +0100)
committerChristian Marangi <[email protected]>
Wed, 26 Nov 2025 09:16:48 +0000 (10:16 +0100)
This patch is introducing the same header that the other patch
001-ubifs-utils-link-libmissing.a-in-case-execinfo.h-isn.patch
is guarding against missing in musl libc. We need to
mimic that.

Signed-off-by: Mario Andrés Pérez <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20938
Signed-off-by: Christian Marangi <[email protected]>
tools/mtd-utils/patches/110-portability.patch

index cc4076acb1fac68ddc13324ea0153ff808776617..f226094e0b438ab3b51eee4c876c8c21bab1b4d9 100644 (file)
  #define UBI_VERSION 1
 --- a/ubifs-utils/common/compiler_attributes.h
 +++ b/ubifs-utils/common/compiler_attributes.h
-@@ -1,6 +1,8 @@
+@@ -1,6 +1,12 @@
  #ifndef __COMPILER_ATTRIBUTES_H__
  #define __COMPILER_ATTRIBUTES_H__
  
++#if HAVE_EXECINFO_H
 +#include <execinfo.h>
++#else
++#include "libmissing.h"
++#endif
 +
  #if __has_attribute(__fallthrough__)
  #define fallthrough   __attribute__((__fallthrough__))
  #else
-@@ -11,6 +13,7 @@
+@@ -11,6 +17,7 @@
  #define __unused      __attribute__((__unused__))
  #define __const               __attribute__((__const__))
  #define __must_check    __attribute__((__warn_unused_result__))