Make test files buildable for glibc

This commit is contained in:
Wildan M
2026-03-25 03:11:33 +07:00
parent 186dc66818
commit 46379d7001
34 changed files with 67 additions and 39 deletions
+3
View File
@@ -48,6 +48,8 @@ int main(void) {
exit(EXIT_FAILURE);
}
// no strnlen_s on glibc
#ifndef __GLIBC__
dest1_len = strnlen_s(dest1, 6);
printf("%d\n", dest1_len);
if(dest1_len != 6) {
@@ -68,6 +70,7 @@ int main(void) {
puts("strnlen_s(NULL, 100) failed");
exit(EXIT_FAILURE);
}
#endif
return 0;
}