Add Haiku Support
This commit is contained in:
parent
927e2f3666
commit
bffb6a828f
|
@ -96,6 +96,12 @@ if (WIN32)
|
||||||
# find_library (NSL_LIBRARY NAMES nsl)
|
# find_library (NSL_LIBRARY NAMES nsl)
|
||||||
# find_library (RESOLV_LIBRARY NAMES resolv)
|
# find_library (RESOLV_LIBRARY NAMES resolv)
|
||||||
# set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS})
|
# set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS})
|
||||||
|
elseif (HAIKU)
|
||||||
|
target_link_libraries(miniupnpc-private INTERFACE network)
|
||||||
|
find_library (SOCKET_LIBRARY NAMES network)
|
||||||
|
find_library (NSL_LIBRARY NAMES network)
|
||||||
|
find_library (RESOLV_LIBRARY NAMES network)
|
||||||
|
set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -62,13 +62,13 @@ struct sockaddr_un {
|
||||||
|
|
||||||
#include "miniupnpc_socketdef.h"
|
#include "miniupnpc_socketdef.h"
|
||||||
|
|
||||||
#if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun) && !defined(__GNU__) && !defined(__FreeBSD_kernel__)
|
#if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun) && !defined(__GNU__) && !defined(__FreeBSD_kernel__) && !defined(__HAIKU__)
|
||||||
#define HAS_IP_MREQN
|
#define HAS_IP_MREQN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(HAS_IP_MREQN) && !defined(_WIN32)
|
#if !defined(HAS_IP_MREQN) && !defined(_WIN32)
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#if defined(__sun)
|
#if defined(__sun) || defined(__HAIKU__)
|
||||||
#include <sys/sockio.h>
|
#include <sys/sockio.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -12,6 +12,10 @@
|
||||||
#include "portlistingparse.h"
|
#include "portlistingparse.h"
|
||||||
#include "minixml.h"
|
#include "minixml.h"
|
||||||
|
|
||||||
|
#if defined(__HAIKU__)
|
||||||
|
#define atoui atoui2
|
||||||
|
#endif
|
||||||
|
|
||||||
/* list of the elements */
|
/* list of the elements */
|
||||||
static const struct {
|
static const struct {
|
||||||
const portMappingElt code;
|
const portMappingElt code;
|
||||||
|
|
Loading…
Reference in New Issue