After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 323717 - <netinet/in.h> inclusion necessary on some systems
<netinet/in.h> inclusion necessary on some systems
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.0
Other OpenBSD
: Normal normal
: 0.10.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-10 12:31 UTC by Benjamin Pineau
Modified: 2005-12-16 10:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Benjamin Pineau 2005-12-10 12:31:38 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"
Comment 1 Benjamin Pineau 2005-12-12 16:01:54 UTC
... 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"
Comment 2 Tim-Philipp Müller 2005-12-16 10:14:05 UTC
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)