mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +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];
|
gint pipe_fd[2];
|
||||||
gchar data[4096];
|
gchar data[4096];
|
||||||
|
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
fail_if (pipe (pipe_fd) < 0);
|
fail_if (pipe (pipe_fd) < 0);
|
||||||
|
#else
|
||||||
|
fail_if (_pipe (pipe_fd, 2048, _O_BINARY) < 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
src = setup_fdsrc ();
|
src = setup_fdsrc ();
|
||||||
g_object_set (G_OBJECT (src), "num-buffers", 3, NULL);
|
g_object_set (G_OBJECT (src), "num-buffers", 3, NULL);
|
||||||
|
@ -113,7 +117,11 @@ GST_START_TEST (test_nonseeking)
|
||||||
gchar data[4096];
|
gchar data[4096];
|
||||||
gboolean seekable;
|
gboolean seekable;
|
||||||
|
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
fail_if (pipe (pipe_fd) < 0);
|
fail_if (pipe (pipe_fd) < 0);
|
||||||
|
#else
|
||||||
|
fail_if (_pipe (pipe_fd, 2048, _O_BINARY) < 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
src = setup_fdsrc ();
|
src = setup_fdsrc ();
|
||||||
g_object_set (G_OBJECT (src), "num-buffers", 3, NULL);
|
g_object_set (G_OBJECT (src), "num-buffers", 3, NULL);
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
#include <fcntl.h>
|
||||||
#define EINPROGRESS WSAEINPROGRESS
|
#define EINPROGRESS WSAEINPROGRESS
|
||||||
#else
|
#else
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
|
@ -75,7 +75,11 @@ GST_START_TEST (test_functioning)
|
||||||
memset (&servaddr, 0, sizeof (servaddr));
|
memset (&servaddr, 0, sizeof (servaddr));
|
||||||
servaddr.sin_family = AF_INET;
|
servaddr.sin_family = AF_INET;
|
||||||
servaddr.sin_port = htons (port);
|
servaddr.sin_port = htons (port);
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
inet_aton ("127.0.0.1", &servaddr.sin_addr);
|
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);
|
packet = gst_net_time_packet_new (NULL);
|
||||||
fail_unless (packet != NULL, "failed to create packet");
|
fail_unless (packet != NULL, "failed to create packet");
|
||||||
|
|
Loading…
Reference in a new issue