regression_1000: Re-order the include of <sys/stat.h> header

With musl, the compilation of optee-test would fail:

|   GEN     optee-test/4.6.0/optee-test-4.6.0/xtest/regression_8100_ca_crt.h
| python3 ../../scripts/file_to_c.py --inf ../../cert/ca.crt --out optee-test/4.6.0/optee-test-4.6.0/xtest/regression_8100_ca_crt.h --name regression_8100_ca_crt
| In file included from optee-test/4.6.0/recipe-sysroot/usr/include/sys/stat.h:30,
|                  from optee-test/host/xtest/regression_1000.c:24:
| optee-test/4.6.0/recipe-sysroot/usr/include/bits/stat.h:17:26: error: expected identifier or '(' before '[' token
|    17 |         unsigned __unused[2];
|       |                          ^

The defintion of OP-TEE macro __unused conflicts with the musl implementation
and its use of variables named __unused.

Re-ordering and including <sys/stat.h> before the macro gets defined is
enough to work around the issue.

Signed-off-by: Clément Faure <clement.faure@arm.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
1 file changed
tree: ccd1adb9c70df502393590fe5ac28d7e93d43d83
  1. .github/
  2. cert/
  3. host/
  4. scripts/
  5. ta/
  6. .gitignore
  7. Android.mk
  8. CMakeLists.txt
  9. CMakeToolchain.txt
  10. LICENSE-BSD
  11. LICENSE-GPL
  12. LICENSE.md
  13. Makefile
  14. README.md
  15. typedefs.checkpatch
README.md

OP-TEE sanity testsuite

This git contains source code for the test suite (xtest) used to test the OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_test.

// OP-TEE core maintainers