From a65709b18943fd2f5859738c5000f22e07529967 Mon Sep 17 00:00:00 2001
From: yuncang123 <1050706328@qq.com>
Date: Sun, 15 Sep 2024 02:06:07 +0800
Subject: [PATCH] fix-error-of-cc.compiles-on-aarch

---
 meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 1b2d673..1b4e369 100644
--- a/meson.build
+++ b/meson.build
@@ -538,7 +538,11 @@ int func (void) {
 }
 '''
 
-have_func_strerror_r_char_p = cc.compiles(code, name : 'strerror_r() returns char *')
+    if cc.get_id() == 'clang'
+        have_func_strerror_r_char_p = cc.compiles(code, args : '-Wno-error=unused-command-line-argument', name : 'strerror_r() returns char *')
+    else
+        have_func_strerror_r_char_p = cc.compiles(code, name : 'strerror_r() returns char *')
+    endif
 endif
 
 srcconf.set10('STRERROR_R_CHAR_P', have_func_strerror_r_char_p)
-- 
2.43.0

