GNOME Bugzilla – Bug 323717
<netinet/in.h> inclusion necessary on some systems
Last modified: 2005-12-16 10:14:05 UTC
Distribution/Version: 3.8 gst/rtsp/rtspconnection.c from gst-plugins-good-0.10.0 need to include netinet/in.h, else it won't compile on OpenBSD (and this inclusion won't break a linux build). rtspconnection.c: In function `rtsp_connection_open': rtspconnection.c:35: error: storage size of `sin' isn't known rtspconnection.c:39: error: storage size of `addr' isn't known rtspconnection.c:60: error: dereferencing pointer to incomplete type rtspconnection.c:60: error: type of formal parameter 1 is incomplete rtspconnection.c:35: warning: unused variable `sin' rtspconnection.c:39: warning: unused variable `addr' *** Error code 1 So: --- gst/rtsp/rtspconnection.c.orig Sat Dec 10 13:02:06 2005 +++ gst/rtsp/rtspconnection.c Sat Dec 10 13:02:10 2005 @@ -25,6 +25,7 @@ #include <netdb.h> #include <arpa/inet.h> #include <sys/socket.h> +#include <netinet/in.h> #include "rtspconnection.h"
... and the header files need to be reordered too (see you're inet_aton(3) man page copy ;). So the right patch is: Index: gst/rtsp/rtspconnection.c =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/gst/rtsp/rtspconnection.c,v retrieving revision 1.8 diff -u -r1.8 rtspconnection.c --- gst/rtsp/rtspconnection.c 27 Nov 2005 17:02:53 -0000 1.8 +++ gst/rtsp/rtspconnection.c 12 Dec 2005 16:00:11 -0000 @@ -23,8 +23,9 @@ #include <stdlib.h> #include <string.h> #include <netdb.h> -#include <arpa/inet.h> #include <sys/socket.h> +#include <netinet/in.h> +#include <arpa/inet.h> #include "rtspconnection.h"
Should be fixed in CVS, thanks for the patch! 2005-12-16 Tim-Philipp Müller <tim at centricular dot net> * gst/rtsp/rtspconnection.c: Add <netinet/in.h> include and move <arpa/inet.h> include to make things work on OpenBSD as well (fixes #323717; patch by: Benjamin Pineau)