On 09/30/2013 10:09 AM, Jason Helfman wrote:
> So, what has to be included prior to <stdlib.h> for the
forward
> declaration of struct random_data in that header to no longer be an
> incomplete type? Can you grep your system headers and find what all
> mentions struct random_data?
>
>
In looking through our 8.4 Branch, here are the results of digging the tree:
crypto/openssh/pkcs11.h: unsigned char *random_data,
crypto/heimdal/lib/hx509/ref/pkcs11.h: unsigned char
*random_data,
crypto/heimdal/lib/hx509/hxtool.c:random_data(void *opt, int argc, char
**argv)
sys/netinet/sctp_output.c:
SCTP_READ_RANDOM(randp->random_data, random_len);
Not relevant.
sys/netinet/sctp_header.h: uint8_t random_data[];
Maybe relevant. Can this header be picked up by some include sequence
of standard-only headers, such that using <stdlib.h> in isolation
doesn't have a problem, but <stdlib.h> in combination with this header
causes the problem?
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:
ac_cv_type_struct_random_data=""
Generally, Autoconf wants you to use 'ac_cv_type_struct_random_data=no',
not blank. I don't know if using 'no' instead of a blank would resolve
the compiler core dump you hit. Is there a mail archive where you were
discussing this with the FreeBSD developers?
Also, this build was on FreeBSD 8.4, although you reported the problem
against FreeBSD 8.3. Let's get it resolved on one platform before
bouncing around to another (at the moment, I only have a FreeBSD 8.2
environment for my own testing, so I'm not much help at the moment).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org