Bug 916427: rollup of sctp modifications for Android rs=jesup r=tuexen

This commit is contained in:
Randell Jesup 2014-03-12 02:09:34 -04:00
parent 9fb16ab802
commit b563b203eb
3 changed files with 8 additions and 4 deletions

View File

@ -15,7 +15,6 @@ SOURCES += [
'netinet/sctp_callout.c',
'netinet/sctp_cc_functions.c',
'netinet/sctp_crc32.c',
'netinet/sctp_hashdriver.c',
'netinet/sctp_indata.c',
'netinet/sctp_input.c',
'netinet/sctp_output.c',
@ -54,7 +53,7 @@ LOCAL_INCLUDES += [
'/xpcom/ds',
]
for var in ('SCTP_SIMPLE_ALLOCATOR', 'USE_SCTP_SHA1',
for var in ('SCTP_SIMPLE_ALLOCATOR',
'SCTP_PROCESS_LEVEL_LOCKS', '__Userspace__', 'INET',
'CALLBACK_API', 'SCTP_DEBUG'):
DEFINES[var] = 1

View File

@ -48,9 +48,14 @@ __FBSDID("$FreeBSD: head/sys/netinet/sctp_bsd_addr.c 258765 2013-11-30 12:51:19Z
#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__

View File

@ -402,7 +402,7 @@ struct udphdr {
#else /* !defined(Userspace_os_Windows) */
#include <sys/cdefs.h> /* needed? added from old __FreeBSD__ */
#include <sys/socket.h>
#if defined(__Userspace_os_DragonFly) || defined(__Userspace_os_FreeBSD) || defined(__Userspace_os_Linux) || defined(__Userspace_os_NetBSD) || defined(__Userspace_os_OpenBSD)
#if defined(__Userspace_os_DragonFly) || defined(__Userspace_os_FreeBSD) || defined(__Userspace_os_Linux) || defined(__Userspace_os_NetBSD) || defined(__Userspace_os_OpenBSD) || defined(ANDROID)
#include <pthread.h>
#endif
typedef pthread_mutex_t userland_mutex_t;
@ -484,7 +484,7 @@ struct sx {int dummy;};
/* 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