]> www.infradead.org Git - users/hch/misc.git/commitdiff
selftests/nolibc: drop include guards around standard headers
authorThomas Weißschuh <linux@weissschuh.net>
Thu, 15 May 2025 19:57:55 +0000 (21:57 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Wed, 21 May 2025 13:32:27 +0000 (15:32 +0200)
Nolibc now provides all the headers required by nolibc-test.c.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-9-74f82eea3b59@weissschuh.net
Acked-by: Willy Tarreau <w@1wt.eu>
tools/testing/selftests/nolibc/nolibc-test-linkage.c
tools/testing/selftests/nolibc/nolibc-test.c

index a7ca8325863face9cd4134a717fe4c7761bdeb7f..0636d1b6e8082600726e07b1955524088c8cdd0f 100644 (file)
@@ -2,9 +2,7 @@
 
 #include "nolibc-test-linkage.h"
 
-#ifndef NOLIBC
 #include <errno.h>
-#endif
 
 void *linkage_test_errno_addr(void)
 {
index 0391c7d01380ea2f20d1d07497ea1964bcb6a9f4..dbe13000fb1ac153e9a89f627492daeb584a05d4 100644 (file)
@@ -9,12 +9,9 @@
  *   $(CC) -nostdlib -I/path/to/nolibc/sysroot  => _NOLIBC_* guards are present
  *   $(CC) with default libc                    => NOLIBC* never defined
  */
-#ifndef NOLIBC
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#ifndef _NOLIBC_STDIO_H
-/* standard libcs need more includes */
 #include <sys/auxv.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
@@ -43,8 +40,6 @@
 #include <unistd.h>
 #include <limits.h>
 #include <ctype.h>
-#endif
-#endif
 
 #pragma GCC diagnostic ignored "-Wmissing-prototypes"