]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
zip: fix configure check by using _Static_assert
authorChen Qi <Qi.Chen@windriver.com>
Mon, 19 Jun 2023 04:35:53 +0000 (12:35 +0800)
committerSteve Sakoman <steve@sakoman.com>
Mon, 17 Jul 2023 14:45:01 +0000 (04:45 -1000)
commit6f5986fb520ab89b0950d3e0fa8492de4de7798f
tree3add2f89f503f648a9ef00634e7e00d6a5e18516
parent006ff31ddad4c53c63adf1dacecbf2783404a546
zip: fix configure check by using _Static_assert

It's incorrect to run a cross-compiled program on build machine
to check if some feature is available or not. As these two checks
in zip are basically just checking the size, we can use _Static_assert
and sizeof to do such check at compile time.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit dda778d855b1838ae3004a9af310724b913490b4)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-extended/zip/zip-3.0/0001-unix-configure-use-_Static_assert-to-do-correct-dete.patch [new file with mode: 0644]
meta/recipes-extended/zip/zip_3.0.bb