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
+10
View File
@@ -4,6 +4,9 @@
#include <stdlib.h>
#include <stdio.h>
// does not compile with glibc
#ifndef __GLIBC__
__attribute__((nonnull(2)))
static void vwarn_test(int code, const char* fmt, ...) {
va_list ap;
@@ -45,7 +48,14 @@ int main(void) {
// two functions handle everything internally.
errc(EXIT_SUCCESS, EUSERS, "Bye. It's crowded.");
// Unreachable
puts("err did not exit");
return EXIT_FAILURE;
}
#else
int main(void) {
exit(0);
}
#endif