On Thu, Aug 29, 2013 at 8:08 AM, Eric Blake <eblake@redhat.com> wrote:
stdlib.h:#define RAND_MAX 0x7fffffffOn 08/29/2013 08:58 AM, Jason Helfman wrote:The relevant section:
> Hello,
>
> There is an initiative at FreeBSD in removing gcc from base system and
> using CLANG. That being said, we are trying to resolve issues of ports that
> can't build without gcc. Libvirt fell into this group, and are curious if
> anyone has any ideas on why this breakage would occur.
>
> Here is a link to the buildlog:
> http://pb2.nyi.freebsd.org/bulk/nogcc-default/2013-08-26_21h09m25s/logs/errors/libvirt-1.1.1.log
util/virrandom.c:75:1: error: bit-field '_gl_verify_error_if_negative'
has negative width (-1)
verify(((RAND_MAX + 1U) & RAND_MAX) == 0);
^
../gnulib/lib/verify.h:251:19: note: expanded from macro 'verify'
#define verify(R) _GL_VERIFY (R, "verify (" #R ")")
^
../gnulib/lib/verify.h:211:8: note: expanded from macro '_GL_VERIFY'
[_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
^
../gnulib/lib/verify.h:176:15: note: expanded from macro '_GL_VERIFY_TRUE'
(!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
^
../gnulib/lib/verify.h:196:27: note: expanded from macro '_GL_VERIFY_TYPE'
struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
^
1 error generated.
gmake[3]: *** [libvirt_util_la-virrandom.lo] Error 1
What does RAND_MAX expand to?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-jgh