<div dir="ltr">On Sat, Sep 28, 2013 at 4:36 PM, Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>On 09/27/2013 01:01 PM, Jason Helfman wrote:<br>
> On Fri, Sep 27, 2013 at 4:57 AM, Eric Blake <<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>> wrote:<br>
><br>
>> On 09/27/2013 01:35 AM, Michal Privoznik wrote:<br>
>>><br>
>>> make[3]: Entering directory<br>
>>> `/home/zippy/work/tmp/a/libvirt-1.1.2/gnulib/lib'<br>
>>>   CC       allocator.lo<br>
>>> In file included from allocator.c:4:0:<br>
>>> ./stdlib.h:76:8: error: redefinition of 'struct random_data'<br>
>>>  struct random_data<br>
>>>         ^<br>
>>> In file included from ./stdlib.h:36:0,<br>
>>>                  from allocator.c:4:<br>
>>> /usr/include/stdlib.h:349:8: note: originally defined here<br>
>>>  struct random_data<br>
>>>         ^<br>
<br>
</div><div>>> Can<br>
>> you show me the config.log output related to detecting whether 'struct<br>
>> random_data' exists?  Is this a case of circular header inclusion on<br>
>> FreeBSD (that is, does <sys/types.h> try to recursively include<br>
>> <stdlib.h> to pick up the struct?)<br>
<br>
</div><div>> Should be available here:<br>
> <a href="http://people.freebsd.org/~jgh/files/libvirt_83amd64.tar.xz" target="_blank">http://people.freebsd.org/~jgh/files/libvirt_83amd64.tar.xz</a><br>
<br>
</div>Thanks; looking through that, I see:<br>
<br>
configure:31404: checking for struct random_data<br>
configure:31404: cc -std=gnu99 -c -O2 -pipe -fno-strict-aliasing<br>
-D_THREAD_SAFE -D_THREAD_SAFE conftest.c >&5<br>
conftest.c: In function 'main':<br>
conftest.c:346: error: invalid application of 'sizeof' to incomplete<br>
type 'struct random_data'<br>
...<br>
<br>
| #include <stdlib.h><br>
|       #if HAVE_RANDOM_H<br>
|       # include <random.h><br>
|       #endif<br>
|<br>
|<br>
| int<br>
| main ()<br>
| {<br>
| if (sizeof (struct random_data))<br>
<br>
So, what has to be included prior to <stdlib.h> for the forward<br>
declaration of struct random_data in that header to no longer be an<br>
incomplete type?  Can you grep your system headers and find what all<br>
mentions struct random_data?<br>
<div><div><br>
</div></div></blockquote></div><br></div><div class="gmail_extra">In looking through our 8.4 Branch, here are the results of digging the tree:<br><br>crypto/openssh/pkcs11.h:                       unsigned char *random_data,<br>

crypto/heimdal/lib/hx509/ref/pkcs11.h:                 unsigned char *random_data,<br>crypto/heimdal/lib/hx509/hxtool.c:random_data(void *opt, int argc, char **argv)<br>sys/netinet/sctp_output.c:              SCTP_READ_RANDOM(randp->random_data, random_len);<br>

sys/netinet/sctp_header.h:      uint8_t random_data[];<br><br></div><div class="gmail_extra">Per another developer at FreeBSD, it seems to be a bug in 8.x branch and picking up something it shouldn't and was "fixed" by adding this to the configure environment:<br>
<span>ac_cv_type_struct_random_data=""<br><br></span><a href="http://redports.org/~jgh/20130930154500-61365-148605/libvirt-1.1.2.log">http://redports.org/~jgh/20130930154500-61365-148605/libvirt-1.1.2.log</a><br>
<br></div><div class="gmail_extra">However the build still fails, but looks to be a more standard failure. Any more ideas on this?<br><br></div><div class="gmail_extra">-jgh<br></div><div class="gmail_extra"><br clear="all">
<br>-- <br><div dir="ltr">Jason Helfman          | FreeBSD Committer<br>jgh@FreeBSD.org     | <a href="http://people.freebsd.org/%7Ejgh" target="_blank">http://people.freebsd.org/~jgh</a>  | The Power to Serve<br>
</div>
</div></div>