~ubuntu-branches/ubuntu/precise/ffmpeg-debian/precise

« back to all changes in this revision

Viewing changes to libavformat/os_support.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-01-20 09:20:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090120092053-izz63p40hc98qfgp
Tags: 3:0.svn20090119-1ubuntu1
* merge from debian. LP: #318501
* new version fixes CVE-2008-3230, LP: #253767

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include <sys/time.h>
31
31
#include "os_support.h"
32
32
 
33
 
#ifdef CONFIG_NETWORK
34
 
#ifndef HAVE_POLL_H
35
 
#ifdef HAVE_WINSOCK2_H
 
33
#if CONFIG_NETWORK
 
34
#if !HAVE_POLL_H
 
35
#if HAVE_WINSOCK2_H
36
36
#include <winsock2.h>
37
 
#elif defined (HAVE_SYS_SELECT_H)
 
37
#elif HAVE_SYS_SELECT_H
38
38
#include <sys/select.h>
39
39
#endif
40
40
#endif
41
41
 
42
42
#include "network.h"
43
43
 
44
 
#if !defined(HAVE_INET_ATON)
 
44
#if !HAVE_INET_ATON
45
45
#include <stdlib.h>
46
46
#include <strings.h>
47
47
 
58
58
 
59
59
    return 1;
60
60
}
61
 
#endif /* !defined(HAVE_INET_ATON) */
 
61
#endif /* !HAVE_INET_ATON */
62
62
 
63
63
/* resolve host with also IP address parsing */
64
64
int resolve_host(struct in_addr *sin_addr, const char *hostname)
76
76
 
77
77
int ff_socket_nonblock(int socket, int enable)
78
78
{
79
 
#ifdef HAVE_WINSOCK2_H
 
79
#if HAVE_WINSOCK2_H
80
80
   return ioctlsocket(socket, FIONBIO, &enable);
81
81
#else
82
82
   if (enable)
87
87
}
88
88
#endif /* CONFIG_NETWORK */
89
89
 
90
 
#ifdef CONFIG_FFSERVER
91
 
#ifndef HAVE_POLL_H
 
90
#if CONFIG_FFSERVER
 
91
#if !HAVE_POLL_H
92
92
int poll(struct pollfd *fds, nfds_t numfds, int timeout)
93
93
{
94
94
    fd_set read_set;
98
98
    int n;
99
99
    int rc;
100
100
 
101
 
#ifdef HAVE_WINSOCK2_H
 
101
#if HAVE_WINSOCK2_H
102
102
    if (numfds >= FD_SETSIZE) {
103
103
        errno = EINVAL;
104
104
        return -1;
113
113
    for(i = 0; i < numfds; i++) {
114
114
        if (fds[i].fd < 0)
115
115
            continue;
116
 
#ifndef HAVE_WINSOCK2_H
 
116
#if !HAVE_WINSOCK2_H
117
117
        if (fds[i].fd >= FD_SETSIZE) {
118
118
            errno = EINVAL;
119
119
            return -1;