mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-16 00:03:45 +00:00
Updated so compiles for MIPS correctly
This commit is contained in:
@@ -27,7 +27,9 @@ limitations under the License.
|
||||
#include <WinBase.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <ifaddrs.h>
|
||||
#ifndef NO_IFADDR
|
||||
#include <ifaddrs.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "ILibDuktape_Dgram.h"
|
||||
@@ -123,6 +125,7 @@ void ILibDuktape_Dgram_Socket_OnSendOK(ILibAsyncUDPSocket_SocketModule socketMod
|
||||
int ILibDuktape_DGram_getIPv6ScopeID(struct in6_addr *addr)
|
||||
{
|
||||
int retVal = 0;
|
||||
#ifndef NO_IFADDR
|
||||
struct ifaddrs *addrlist;
|
||||
struct ifaddrs *current;
|
||||
if (getifaddrs(&addrlist) == 0)
|
||||
@@ -142,6 +145,7 @@ int ILibDuktape_DGram_getIPv6ScopeID(struct in6_addr *addr)
|
||||
}
|
||||
freeifaddrs(addrlist);
|
||||
}
|
||||
#endif
|
||||
return(retVal);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,9 @@ limitations under the License.
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <ifaddrs.h>
|
||||
#ifndef NO_IFADDR
|
||||
#include <ifaddrs.h>
|
||||
#endif
|
||||
#ifndef __APPLE__
|
||||
#include <netpacket/packet.h>
|
||||
#else
|
||||
@@ -1225,6 +1227,7 @@ duk_ret_t ILibDuktape_ScriptContainer_OS_networkInterfaces(duk_context *ctx)
|
||||
padapters = padapters->Next;
|
||||
}
|
||||
#else
|
||||
#ifndef NO_IFADDR
|
||||
struct ifaddrs *addrlist;
|
||||
struct ifaddrs *current;
|
||||
if (getifaddrs(&addrlist) == 0)
|
||||
@@ -1356,7 +1359,7 @@ duk_ret_t ILibDuktape_ScriptContainer_OS_networkInterfaces(duk_context *ctx)
|
||||
}
|
||||
duk_pop(ctx);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
return(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2373,7 +2373,7 @@ typedef struct duk_hthread duk_context;
|
||||
* that too. Android doesn't have log2; disable all of these for Android.
|
||||
*/
|
||||
#if (defined(DUK_F_C99) || defined(DUK_F_CPP11) || (defined(_MSC_VER) && (_MSC_VER >= 1800))) && \
|
||||
!defined(DUK_F_ANDROID) && !defined(DUK_F_MINT)
|
||||
!defined(DUK_F_ANDROID) && !defined(DUK_F_MINT) && !defined(BADMATH)
|
||||
#if !defined(DUK_CBRT)
|
||||
#define DUK_CBRT cbrt
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user