mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
Fix for Windows
- "winsock2.h" needs to be included before "windows.h". But if a compilation unit include "windows.h" and after "networkTools.h", we fails and it is complicated to handle. The include must not be in the header but in the cpp - windows define some ERROR macro. It is a pitty but we cannot use `ERROR` in our enum. - If build statically using mingw we need to define `CURL_STATICLIB`
This commit is contained in:
@ -20,25 +20,8 @@
|
||||
#ifndef KIWIX_NETWORKTOOLS_H
|
||||
#define KIWIX_NETWORKTOOLS_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
#include <net/if.h>
|
||||
#include <netdb.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace kiwix
|
||||
{
|
||||
|
Reference in New Issue
Block a user