From 462564f31bbdc9939bf1d2376e2782defa7ef655 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Wed, 23 Feb 2011 13:32:37 +0100 Subject: Minor cleanups for core/ui Makefile separation. This patch contains minor cleanups that will be needed by a few future patches that will improve the way core and ui sources are separated and built. - remove a few compiler warnings - formatting - remove the memcheck CONFIG_MEMCHECK checks (they later get in the way) - refine hw/hw.h inclusion's of cpu.h (this comes from upstream) - add missing definitions for PRUd64 and PRUx64 (used later) - remove CONFIG_SHAPER test, replace with CONFIG_ANDROID instead. - add missing strdup() calls. Change-Id: Ic7d6681a51af718c298f0ee4bd884b1d8750f28e --- net-android.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'net-android.c') diff --git a/net-android.c b/net-android.c index 234235b..6459eff 100644 --- a/net-android.c +++ b/net-android.c @@ -126,7 +126,7 @@ #include "libslirp.h" #endif -#if defined(CONFIG_SHAPER) +#if defined(CONFIG_ANDROID) #include "shaper.h" #endif @@ -730,7 +730,7 @@ ip_packet_is_internal( const uint8_t* data, size_t size ) return ( data[12] == 10 && data[16] == 10); } -#ifdef CONFIG_SHAPER +#ifdef CONFIG_ANDROID NetShaper slirp_shaper_in; NetShaper slirp_shaper_out; @@ -773,12 +773,12 @@ slirp_init_shapers( void ) netshaper_set_rate( slirp_shaper_in, qemu_net_upload_speed ); } -#endif /* CONFIG_SHAPER */ +#endif /* CONFIG_ANDROID */ int slirp_can_output(void) { -#ifdef CONFIG_SHAPER +#ifdef CONFIG_ANDROID return !slirp_vc || ( netshaper_can_send(slirp_shaper_out) && qemu_can_send_packet(slirp_vc) ); @@ -799,7 +799,7 @@ void slirp_output(const uint8_t *pkt, int pkt_len) if (!slirp_vc) return; -#ifdef CONFIG_SHAPER +#ifdef CONFIG_ANDROID netshaper_send(slirp_shaper_out, (void*)pkt, pkt_len); #else qemu_send_packet(slirp_vc, pkt, pkt_len); @@ -820,7 +820,7 @@ static ssize_t slirp_receive(VLANClientState *vc, const uint8_t *buf, size_t siz if (qemu_tcpdump_active) qemu_tcpdump_packet(buf, size); -#ifdef CONFIG_SHAPER +#ifdef CONFIG_ANDROID netshaper_send(slirp_shaper_in, (char*)buf, size); #else slirp_input(buf, size); -- cgit v1.1