cmocka icon indicating copy to clipboard operation
cmocka copied to clipboard

include: Check for previous declaration of uintptr_t

Open leitao opened this issue 7 years ago • 1 comments

Adding an extra check before declaring uintptr_t. Currently musl libc uses a macro __DEFINED_uintptr_t once it defines uintptr_t type. We should check for this macro before defining it, and, defining this macro when uintptr_t is defined by cmocka.

Signed-off-by: Breno Leitao [email protected]

leitao avatar Mar 29 '17 18:03 leitao

A similar commit has been added upstream (but not yet officially published). See https://gitlab.com/cmocka/cmocka/-/commit/28ce16b29911e5adc60140b572dee177adc7a178. However, I've tested it and it doesn't seem to work when using CMocka with FetchContent.

However, in another newer commit, the uintptr_t declaration has been completely removed https://gitlab.com/cmocka/cmocka/-/commit/0e70150002ab7bcb626109b287f23c62ecf97565, and that seems to work fine for me!

aloisklink avatar Sep 05 '22 13:09 aloisklink

This is a fork of cmocka. I'd recommend to move this to the upstream repository.

diasbruno avatar Apr 10 '24 12:04 diasbruno

:+1: If you do need a GitHub version, there's also a mirror of CMocka hosted on GitHub from @coreboot that's usually updated within 24 hours of an upstream change: https://github.com/coreboot/cmocka

But again, any bug reports and contributions should instead be sent to the upstream project at https://cmocka.org!

aloisklink avatar Apr 10 '24 12:04 aloisklink