Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
aa25960c
Commit
aa25960c
authored
Nov 27, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32: really set fd_set size dynamically
parent
e59ca646
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
src/network/poll.c
src/network/poll.c
+15
-4
No files found.
src/network/poll.c
View file @
aa25960c
...
...
@@ -26,11 +26,9 @@
#endif
#include <vlc_common.h>
#include <stdlib.h>
#include <vlc_network.h>
#ifdef HAVE_MAEMO
# include <vlc_network.h>
# include <signal.h>
# include <errno.h>
# include <poll.h>
...
...
@@ -63,6 +61,8 @@ int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
}
#elif defined (HAVE_POLL)
# include <vlc_network.h>
struct
pollfd
;
int
vlc_poll
(
struct
pollfd
*
fds
,
unsigned
nfds
,
int
timeout
)
...
...
@@ -73,12 +73,19 @@ int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
#elif defined (WIN32)
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#ifdef FD_SETSIZE
/* No, it's not as simple as #undef FD_SETSIZE */
# error Header inclusion order compromised!
#endif
#define FD_SETSIZE 0
#include <vlc_network.h>
int
vlc_poll
(
struct
pollfd
*
fds
,
unsigned
nfds
,
int
timeout
)
{
size_t
setsize
=
sizeof
(
fd_set
)
+
(
nfds
-
FD_SETSIZE
)
*
sizeof
(
SOCKET
);
size_t
setsize
=
sizeof
(
fd_set
)
+
nfds
*
sizeof
(
SOCKET
);
fd_set
*
rdset
=
malloc
(
setsize
);
fd_set
*
wrset
=
malloc
(
setsize
);
fd_set
*
exset
=
malloc
(
setsize
);
...
...
@@ -94,6 +101,10 @@ int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
return
-
1
;
}
/* Winsock FD_SET uses FD_SETSIZE in its expansion */
#undef FD_SETSIZE
#define FD_SETSIZE (nfds)
resume:
val
=
-
1
;
vlc_testcancel
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment