Message ID | 20230413-nolibc-stdio-fix-v2-1-6b6bbb045a80@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | d7eafa64a158cc9f1d26b3c615d4ada3c17c02ee |
Headers | show |
Series | [v2] tools/nolibc: Fix build of stdio.h due to header ordering | expand |
On 5/8/23 07:30, Mark Brown wrote: > When we added fd based file streams we created references to STx_FILENO in > stdio.h but these constants are declared in unistd.h which is the last file > included by the top level nolibc.h meaning those constants are not defined > when we try to build stdio.h. This causes programs using nolibc.h to fail > to build. > > Reorder the headers to avoid this issue. > > Fixes: d449546c957f ("tools/nolibc: implement fd-based FILE streams") > Acked-by: Willy Tarreau <w@1wt.eu> > Signed-off-by: Mark Brown <broonie@kernel.org> > --- Applied now to linux-kselftest fixes for 6.4-rc2 thanks, -- Shuah
diff --git a/tools/include/nolibc/nolibc.h b/tools/include/nolibc/nolibc.h index 04739a6293c4..05a228a6ee78 100644 --- a/tools/include/nolibc/nolibc.h +++ b/tools/include/nolibc/nolibc.h @@ -99,11 +99,11 @@ #include "sys.h" #include "ctype.h" #include "signal.h" +#include "unistd.h" #include "stdio.h" #include "stdlib.h" #include "string.h" #include "time.h" -#include "unistd.h" #include "stackprotector.h" /* Used by programs to avoid std includes */