windows: Do not include headers not available on Windows

This is a preparatory patch for next portability patches

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Frediano Ziglio 2018-06-20 14:23:44 +01:00
parent e91c57e6f4
commit f8e8ac4910
12 changed files with 32 additions and 11 deletions

View File

@ -24,7 +24,9 @@
#include <string.h>
#include <pthread.h>
#include <fcntl.h>
#ifndef _WIN32
#include <poll.h>
#endif
#include "dispatcher.h"

View File

@ -24,11 +24,13 @@
#include <stdbool.h>
#include <string.h>
#include <sys/types.h>
#ifndef _WIN32
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#endif
#include <common/log.h>

View File

@ -22,12 +22,14 @@
#include <glib.h>
#include <stdio.h>
#include <stdint.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#ifndef _WIN32
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/ioctl.h>
#endif
#ifdef HAVE_LINUX_SOCKIOS_H
#include <linux/sockios.h> /* SIOCOUTQ */
#endif

View File

@ -24,7 +24,6 @@
#include <errno.h>
#include <string.h>
#include <pthread.h>
#include <sys/socket.h>
#include <inttypes.h>
#include <spice/qxl_dev.h>

View File

@ -20,11 +20,13 @@
#endif
#include <errno.h>
#include <netdb.h>
#include <unistd.h>
#include <sys/socket.h>
#include <fcntl.h>
#ifndef _WIN32
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#endif
#include <glib.h>

View File

@ -22,16 +22,21 @@
#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
#include <limits.h>
#include <pthread.h>
#include <ctype.h>
#ifndef _WIN32
#include <sys/socket.h>
#include <sys/uio.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <limits.h>
#include <pthread.h>
#include <sys/mman.h>
#include <ctype.h>
#include <sys/un.h>
#else
#include <ws2tcpip.h>
#endif
#include <openssl/err.h>
@ -40,7 +45,6 @@
#endif
#include <glib.h>
#include <sys/un.h>
#include <spice/protocol.h>
#include <spice/vd_agent.h>

View File

@ -19,7 +19,6 @@
#define REDS_H_
#include <stdint.h>
#include <sys/uio.h>
#include <spice/vd_agent.h>
#include <common/marshaller.h>
#include <common/messages.h>

View File

@ -23,10 +23,12 @@
#include <errno.h>
#include <limits.h>
#include <sys/types.h>
#ifndef _WIN32
#include <netinet/in.h>
#include <sys/socket.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#endif
#include <common/generated_server_marshallers.h>
#include <common/snd_codec.h>

View File

@ -23,7 +23,13 @@
#endif
#include <stdint.h>
#ifndef _WIN32
#include <sys/socket.h>
#else
#include <winsock2.h>
#include <windows.h>
typedef int socklen_t;
#endif
#include <spice/qxl_dev.h>
#include <spice/vd_agent.h>
#include <spice/macros.h>

View File

@ -30,7 +30,9 @@
#include <signal.h>
#include <unistd.h>
#include <pthread.h>
#ifndef _WIN32
#include <sys/wait.h>
#endif
#include <fcntl.h>
#include <glib.h>
#include <pthread.h>

View File

@ -21,8 +21,10 @@
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#ifndef _WIN32
#include <sys/wait.h>
#include <sys/select.h>
#endif
#include <sys/types.h>
#include <getopt.h>
#include <pthread.h>

View File

@ -17,7 +17,6 @@
*/
#include <config.h>
#include <stdio.h>
#include <sys/select.h>
#include <sys/time.h>
#include <math.h>