tools/nolibc: Fix build of stdio.h due to header ordering
authorMark Brown <broonie@kernel.org>
Thu, 13 Apr 2023 16:26:32 +0000 (17:26 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 9 Jun 2023 18:45:34 +0000 (11:45 -0700)
commit3a8039e289a337aeaa9ad37f3fcd411d83fee983
treee99f69411787d888bdb1ae0a7af4eb450da84056
parent69f2cd9fea01a21259d361e839efd02cba7fe945
tools/nolibc: Fix build of stdio.h due to header ordering

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")
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/nolibc.h