[PATCH 1/1] Fix uClibc build on 64bit platforms by including stdint.h

Andrew Bartlett abartlet at samba.org
Sun Jan 28 20:34:15 UTC 2018

On Sun, 2018-01-28 at 18:26 +0100, Volker Lendecke via samba-technical
> On Sun, Jan 28, 2018 at 12:35:14PM +0100, Bernd Kuhls via samba-technical wrote:
> > Fixes an error detected by buildroot autobuilders:
> > http://autobuild.buildroot.net/results/573/573e2268e205e10d1352fa81122d8f225fdb4575/build-end.log
> > 
> > /home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/stdint.h:122:27:
> > 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.

This comment at the top of the test tends to imply that this is
deliberate, but of course doesn't mention stdint.h.  Perhaps on glibc
stdint.h is already in one of
 * #include <stdarg.h>
 * #include <stddef.h>
 * #include <setjmp.h>

I will note that replace.h does come in via ldb_private.h in that test,
but after cmocka is included.  

Andrew Bartlett
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba

More information about the samba-technical mailing list