[PATCH 1/1] Fix uClibc build on 64bit platforms by including stdint.h
bernd.kuhls at t-online.de
Sun Jan 28 18:46:03 UTC 2018
Am 28.01.2018 um 18:26 schrieb Volker Lendecke:
> On Sun, Jan 28, 2018 at 12:35:14PM +0100, Bernd Kuhls via samba-technical wrote:
>> Fixes an error detected by buildroot autobuilders:
>> error: conflicting types for 'uintptr_t'
>> typedef unsigned long int uintptr_t;
>> In file included from ../lib/ldb/tests/ldb_msg.c:17:0:
>> ../third_party/cmocka/cmocka.h:126:28: note: previous declaration of 'uintptr_t' was here
>> typedef unsigned int uintptr_t;
>> The define __WORDSIZE is missing when cmocka.h decides how to
>> define uintptr_t, this patch includes stdint.h when needed.
> Isn't that a bug in cmocka? Shouldn't cmocka include stdint.h itself?
> I'm asking because our "replace.h" include already contains stdint.h,
> we should never have to include that explicitly.
cmocka.c includes stdint.h before including cmocka.h, my patch does the
same for the other .c files which include cmocka.h. Apparently upstream
did not consider the use case of including cmocka.h directly.
Of course adding "#include <stdint.h>" directly to
third_party/cmocka/cmocka.h fixes the problem as well.
More information about the samba-technical