gecko-dev/netwerk/sctp/android.patch

81 строка
2.4 KiB
Diff

exporting patch:
# HG changeset patch
# User Randell Jesup <rjesup@jesup.org>
# Date 1425533209 18000
# Thu Mar 05 00:26:49 2015 -0500
# Node ID 4c7148e103e122f2fae1736685210b70be452c49
# Parent 190f209ef80df453961b357a4a31d80247afd72b
Bug 1297418: rollup of sctp modifications for Android and a capitalization change rs=jesup
diff --git a/netwerk/sctp/src/netinet/sctp_bsd_addr.c b/netwerk/sctp/src/netinet/sctp_bsd_addr.c
--- a/netwerk/sctp/src/netinet/sctp_bsd_addr.c
+++ b/netwerk/sctp/src/netinet/sctp_bsd_addr.c
@@ -43,19 +43,24 @@
#include <netinet/sctp_output.h>
#include <netinet/sctp_bsd_addr.h>
#include <netinet/sctp_uio.h>
#include <netinet/sctputil.h>
#include <netinet/sctp_timer.h>
#include <netinet/sctp_asconf.h>
#include <netinet/sctp_sysctl.h>
#include <netinet/sctp_indata.h>
+#if defined(ANDROID)
+#include <unistd.h>
+#include <ifaddrs-android-ext.h>
+#else
#if defined(__FreeBSD__)
#include <sys/unistd.h>
#endif
+#endif
/* Declare all of our malloc named types */
#ifndef __Panda__
MALLOC_DEFINE(SCTP_M_MAP, "sctp_map", "sctp asoc map descriptor");
MALLOC_DEFINE(SCTP_M_STRMI, "sctp_stri", "sctp stream in array");
MALLOC_DEFINE(SCTP_M_STRMO, "sctp_stro", "sctp stream out array");
MALLOC_DEFINE(SCTP_M_ASC_ADDR, "sctp_aadr", "sctp asconf address");
MALLOC_DEFINE(SCTP_M_ASC_IT, "sctp_a_it", "sctp asconf iterator");
diff --git a/netwerk/sctp/src/netinet/sctp_os_userspace.h b/netwerk/sctp/src/netinet/sctp_os_userspace.h
--- a/netwerk/sctp/src/netinet/sctp_os_userspace.h
+++ b/netwerk/sctp/src/netinet/sctp_os_userspace.h
@@ -40,18 +40,18 @@
*/
#include <errno.h>
#if defined(__Userspace_os_Windows)
#include <winsock2.h>
#include <ws2tcpip.h>
#include <iphlpapi.h>
-#include <Mswsock.h>
-#include <Windows.h>
+#include <mswsock.h>
+#include <windows.h>
#include "user_environment.h"
typedef CRITICAL_SECTION userland_mutex_t;
#if WINVER < 0x0600
enum {
C_SIGNAL = 0,
C_BROADCAST = 1,
C_MAX_EVENTS = 2
};
@@ -490,17 +490,17 @@ struct sx {int dummy;};
#include <user_ip_icmp.h>
#endif
/* #include <netinet/in_pcb.h> ported to userspace */
#include <user_inpcb.h>
/* for getifaddrs */
#include <sys/types.h>
#if !defined(__Userspace_os_Windows)
-#if defined(INET) || defined(INET6)
+#if !defined(ANDROID) && (defined(INET) || defined(INET6))
#include <ifaddrs.h>
#endif
/* for ioctl */
#include <sys/ioctl.h>
/* for close, etc. */
#include <unistd.h>