changeset 3411:d03e47de3a89

Merge
author zgu
date Fri, 21 Jan 2011 11:38:25 -0800
parents 9c18818e7a5f 2381e810330b
children d1365fdfb3ea
files
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/demo/jvmti/hprof/hprof_md.c	Fri Jan 21 09:45:23 2011 -0800
+++ b/src/windows/demo/jvmti/hprof/hprof_md.c	Fri Jan 21 11:38:25 2011 -0800
@@ -29,12 +29,14 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+// To ensure winsock2.h is used, it has to be included ahead of
+// windows.h, which includes winsock.h by default.
+#include <winsock2.h>
 #include <windows.h>
 #include <io.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <mmsystem.h>
-#include <winsock2.h>
 #include <fcntl.h>
 #include <process.h>
 
@@ -147,7 +149,7 @@
 void
 md_close(int filedes)
 {
-    (void)close(filedes);
+    (void)closesocket(filedes);
 }
 
 int