mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
win32: Fix build failures of tests
This commit is contained in:
parent
f563ac57f8
commit
253ebab319
3 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <winsock2.h>
|
||||
#include <fcntl.h>
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue