mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
Fix undefined reference to 'close_used_without_including_unistd_h'
Found while trying to cross-compile libvirt on Fedora 12 for Windows. gnulib redefines 'close' to 'close_used_without_including_unistd_h' in sys/socket.h if winsock2.h is present and unistd.h has not been included before sys/socket.h. Reorder some includes to fix this.
This commit is contained in:
parent
9501a45fc0
commit
457d4ad99d
@ -25,10 +25,10 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <dirent.h>
|
||||
|
@ -23,10 +23,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Windows socket compatibility functions. */
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
@ -37,7 +33,11 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifndef HAVE_WINSOCK2_H /* Unix & Cygwin. */
|
||||
/* Windows socket compatibility functions. */
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#ifndef HAVE_WINSOCK2_H /* Unix & Cygwin. */
|
||||
# include <sys/un.h>
|
||||
# include <net/if.h>
|
||||
# include <netinet/in.h>
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "verify.h"
|
||||
#include "internal.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user