Commit 39dba5aa authored by Martin Storsjö's avatar Martin Storsjö
Browse files

network: Include unistd.h from network.h



This heaader is required for close() for sockets in network
code. For winsock, the equivalent function is defined in the
winsock2.h header.

This avoids having the HAVE_UNISTD_H in all files dealing with
raw sockets.
Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
parent b8c632a7
...@@ -27,6 +27,10 @@ ...@@ -27,6 +27,10 @@
#include "libavutil/error.h" #include "libavutil/error.h"
#include "os_support.h" #include "os_support.h"
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_WINSOCK2_H #if HAVE_WINSOCK2_H
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/sctp.h> #include <netinet/sctp.h>
#include <unistd.h>
#include "config.h" #include "config.h"
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
*/ */
#include "avformat.h" #include "avformat.h"
#include "libavutil/parseutils.h" #include "libavutil/parseutils.h"
#include <unistd.h>
#include "internal.h" #include "internal.h"
#include "network.h" #include "network.h"
#include "os_support.h" #include "os_support.h"
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "avio_internal.h" #include "avio_internal.h"
#include "libavutil/parseutils.h" #include "libavutil/parseutils.h"
#include "libavutil/avstring.h" #include "libavutil/avstring.h"
#include <unistd.h>
#include "internal.h" #include "internal.h"
#include "network.h" #include "network.h"
#include "os_support.h" #include "os_support.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment