From af6944a35b97a971139d93da49e09e023005f633 Mon Sep 17 00:00:00 2001 From: Angelo Mantellini Date: Mon, 5 Aug 2019 08:11:07 +0200 Subject: [HICN-257] facemgr for android Signed-off-by: Angelo Mantellini Change-Id: I2281def568d1faa1093dce81badab6a95fb03a57 --- ctrl/facemgr/src/util/ip_address.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ctrl/facemgr/src/util/ip_address.h') diff --git a/ctrl/facemgr/src/util/ip_address.h b/ctrl/facemgr/src/util/ip_address.h index 165394709..243ce048b 100644 --- a/ctrl/facemgr/src/util/ip_address.h +++ b/ctrl/facemgr/src/util/ip_address.h @@ -27,6 +27,9 @@ #include #else #include +#ifdef __ANDROID__ +#include +#endif #endif #include #include // struct addrinfo @@ -87,7 +90,11 @@ typedef struct { /* No htonl() with const */ static const ip_address_t IPV4_LOOPBACK = { #if __BYTE_ORDER == __LITTLE_ENDIAN +#ifdef __ANDROID__ + .v4.as_inaddr.s_addr = bswap_32(INADDR_LOOPBACK), +#else .v4.as_inaddr.s_addr = __bswap_constant_32(INADDR_LOOPBACK), +#endif #else .v4.as_inaddr.s_addr = INADDR_LOOPBACK, #endif -- cgit 1.2.3-korg