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 597539 - [gststrpconnection.c] 'close' is not defined in Microsoft's CRT
[gststrpconnection.c] 'close' is not defined in Microsoft's CRT
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.25
Other Windows
: Normal normal
: 0.10.26
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-10-06 11:58 UTC by Andoni Morales
Modified: 2009-10-06 21:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andoni Morales 2009-10-06 11:58:20 UTC
Fixed using _close:

#ifndef WINVER
#define WINVER 0x0501
#endif
+#ifdef _MSC_VER
+       #include <io.h>
+	#define close _close
+#endif
#include <winsock2.h>
#include <ws2tcpip.h>
Comment 1 Wim Taymans 2009-10-06 17:17:42 UTC
or even better:

diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c
index e418893..136d40a 100644
--- a/gst-libs/gst/rtsp/gstrtspconnection.c
+++ b/gst-libs/gst/rtsp/gstrtspconnection.c
@@ -446,7 +446,7 @@ accept_failed:
 getnameinfo_failed:
 wrong_family:
   {
-    close (fd);
+    CLOSE_SOCKET (fd);
     return GST_RTSP_ERROR;
   }
 }

Will push this after freeze.
Comment 2 Wim Taymans 2009-10-06 20:38:19 UTC
commit 730eead9a987b6f94ff07337b247da3c26ad0280
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Tue Oct 6 19:17:49 2009 +0200

    rtsp: use CLOSE_SOCKET() instead of close()
    
    Use CLOSE_SOCKET instead of directly calling close() because it does the right
    thing for windows.
    
    Fixes #597539