GNOME Bugzilla – Bug 586397
gstudpnetutils.h fails to build on FreeBSD
Last modified: 2009-06-19 19:47:48 UTC
Please describe the problem: On FreeBSD #include <sys/socket.h> needs to be included before #includes <net/if.h>. Otherwise complilation fails. In file included from gstudpnetutils.h:43, from gstudpsrc.h:33, from gstudp.c:26: /usr/include/net/if.h:294: error: field 'ifru_addr' has incomplete type /usr/include/net/if.h:295: error: field 'ifru_dstaddr' has incomplete type /usr/include/net/if.h:296: error: field 'ifru_broadaddr' has incomplete type /usr/include/net/if.h:328: error: field 'ifra_addr' has incomplete type /usr/include/net/if.h:329: error: field 'ifra_broadaddr' has incomplete type /usr/include/net/if.h:330: error: field 'ifra_mask' has incomplete type gmake[2]: *** [libgstudp_la-gstudp.lo] Error 1 net/if.h uses sockaddr on these lines. This struct is defined in sys/socket.h. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 137014 [details] [review] Move sys/socket.h before net/if.h to fix the build on FreeBSD