Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
5676d140
Commit
5676d140
authored
May 15, 2007
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial mingw networking support
Originally committed as revision 9029 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
124bed6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
network.h
libavformat/network.h
+13
-3
os_support.c
libavformat/os_support.c
+4
-0
No files found.
libavformat/network.h
View file @
5676d140
...
...
@@ -21,16 +21,26 @@
#ifndef NETWORK_H
#define NETWORK_H
#ifdef __MINGW32__
#include <winsock2.h>
#include <ws2tcpip.h>
#define ff_neterrno() WSAGetLastError()
#define FF_NETERROR(err) WSA##err
#define WSAEAGAIN WSAEWOULDBLOCK
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#include <netdb.h>
#define ff_neterrno() errno
#define FF_NETERROR(err) err
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
int
ff_socket_nonblock
(
int
socket
,
int
enable
);
...
...
libavformat/os_support.c
View file @
5676d140
...
...
@@ -117,10 +117,14 @@ int resolve_host(struct in_addr *sin_addr, const char *hostname)
int
ff_socket_nonblock
(
int
socket
,
int
enable
)
{
#ifdef __MINGW32__
return
ioctlsocket
(
socket
,
FIONBIO
,
&
enable
);
#else
if
(
enable
)
return
fcntl
(
socket
,
F_SETFL
,
fcntl
(
socket
,
F_GETFL
)
|
O_NONBLOCK
);
else
return
fcntl
(
socket
,
F_SETFL
,
fcntl
(
socket
,
F_GETFL
)
&
~
O_NONBLOCK
);
#endif
}
#endif
/* CONFIG_NETWORK */
...
...
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