win32: Fix build failures of tests

This commit is contained in:
Benjamin Otte 2010-03-11 20:29:29 +01:00
parent f563ac57f8
commit 253ebab319
3 changed files with 13 additions and 0 deletions

View file

@ -76,7 +76,11 @@ GST_START_TEST (test_num_buffers)
gint pipe_fd[2];
gchar data[4096];
#ifndef G_OS_WIN32
fail_if (pipe (pipe_fd) < 0);
#else
fail_if (_pipe (pipe_fd, 2048, _O_BINARY) < 0);
#endif
src = setup_fdsrc ();
g_object_set (G_OBJECT (src), "num-buffers", 3, NULL);
@ -113,7 +117,11 @@ GST_START_TEST (test_nonseeking)
gchar data[4096];
gboolean seekable;
#ifndef G_OS_WIN32
fail_if (pipe (pipe_fd) < 0);
#else
fail_if (_pipe (pipe_fd, 2048, _O_BINARY) < 0);
#endif
src = setup_fdsrc ();
g_object_set (G_OBJECT (src), "num-buffers", 3, NULL);

View file

@ -25,6 +25,7 @@
#ifdef G_OS_WIN32
#include <winsock2.h>
#include <fcntl.h>
#define EINPROGRESS WSAEINPROGRESS
#else
#include <sys/socket.h>

View file

@ -75,7 +75,11 @@ GST_START_TEST (test_functioning)
memset (&servaddr, 0, sizeof (servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_port = htons (port);
#ifndef G_OS_WIN32
inet_aton ("127.0.0.1", &servaddr.sin_addr);
#else
servaddr.sin_addr.s_addr = inet_addr ("127.0.0.1");
#endif
packet = gst_net_time_packet_new (NULL);
fail_unless (packet != NULL, "failed to create packet");