diff mbox series

[uclibc-ng-devel] uclibc: prevent warning about declaring an unused function

Message ID 20250106072611.1060-1-marcus.haehnel@kernkonzept.com
State Accepted
Headers show
Series [uclibc-ng-devel] uclibc: prevent warning about declaring an unused function | expand

Commit Message

Marcus Haehnel Jan. 6, 2025, 7:26 a.m. UTC
From: Frank Mehnert <frank.mehnert@kernkonzept.com>

Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
---
 libc/stdlib/stdlib.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c
index f5936630c..c45dd53a5 100644
--- a/libc/stdlib/stdlib.c
+++ b/libc/stdlib/stdlib.c
@@ -822,6 +822,7 @@  libc_hidden_def(_stdlib_mb_cur_max)
 
 #endif
 
+#if defined(L_mblen) || defined(L_mbtowc) || defined(L_wctomb)
 #ifdef __UCLIBC_HAS_LOCALE__
 /*
  * The following function return 1 if the encoding is stateful, 0 if stateless.
@@ -844,6 +845,7 @@  static __always_inline int is_stateful(unsigned char encoding)
 #else
 #define is_stateful(encoding) 0
 #endif
+#endif
 
 /**********************************************************************/
 #ifdef L_mblen