From: Samuel Thibault Date: Thu, 3 Aug 2023 19:16:16 +0000 (+0200) Subject: tst-realpath-toolong: return "unsupported" when PATH_MAX is undefined X-Git-Tag: glibc-2.39~531 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=cbf4aa422c82b895ab56ef5e9acda37947ad4184;p=glibc.git tst-realpath-toolong: return "unsupported" when PATH_MAX is undefined When PATH_MAX is undefined, realpath cannot ever ENAMETOOLONG, so this test is unsupported. --- diff --git a/stdlib/tst-realpath-toolong.c b/stdlib/tst-realpath-toolong.c index 4388890294..a071fe7544 100644 --- a/stdlib/tst-realpath-toolong.c +++ b/stdlib/tst-realpath-toolong.c @@ -24,18 +24,18 @@ #include #include #include +#include #include #include #define BASENAME "tst-realpath-toolong." -#ifndef PATH_MAX -# define PATH_MAX 1024 -#endif - int do_test (void) { +#ifndef PATH_MAX + return EXIT_UNSUPPORTED; +#else char *base = support_create_and_chdir_toolong_temp_directory (BASENAME); char buf[PATH_MAX + 1]; @@ -48,6 +48,7 @@ do_test (void) free (base); return 0; +#endif } #include