Hi,guys! This is my instructions and patches for porting snappy/libspicec-glib.so extracted from spicec-gtk-0.5 onto Android-ARM. It's still nascent and raw though, more hacking is needed! These are my steps, suppose you're familiar with cross compiling.
1.I use the android NDK provided by Mozzila which has nearly full C++ support: http://ftp.mozilla.org/pub/mozilla.org/mobile/source/android-ndk-r4c-0moz3.tar.bz2 and I have modified Andrew Ross's perl script:agcc to extract and use the toolchain from this NDK (attached) 2. Then I cross compile glib2.28.1 onto Android in this order: 1)libiconv-1.13.1.tar.gz: configured by: *CC=agcc CXX=agcc LD=arm-eabi-ld RANLIB=arm-eabi-ranlib \ PKG_CONFIG_LIBDIR=/data/local/lib/pkgconfig:/data/local/share/pkgconfig/ \ ./configure \ --prefix=/data/local \ --host=arm-eabi-linux \* * --enable-shared \* 2)gettext-0.18.1.1.tar.gz configured by: *CC=agcc CPPFLAGS="-I/data/local/include" LDFLAGS="-L/data/local/lib" CXX=agcc LD=arm-eabi-ld RANLIB=arm-eabi-ranlib \ PKG_CONFIG_LIBDIR=/data/local/lib/pkgconfig:/data/local/share/pkgconfig/ \ ./configure \ --prefix=/data/local \ --host=arm-eabi-linux \ --enable-shared \ --cache-file=arm.cache \ --without-included-regex \ --disable-java --disable-openmp --without-libiconv-prefix --without-libintl-prefix --without-libglib-2.0-prefix --without-libcroco-0.6-prefix --with-included-libxml --without-libncurses-prefix --without-libtermcap-prefix --without-libcurses-prefix --without-libexpat-prefix --without-emacs * But the build of gettext will not fully succeed,never mind, I need only libintl.so so just make install. 3) glib-2.28.1.tar.gz 1st, do patching with my attached file *#patch -p0 < ** glib-android.patch* 2nd, write this into the cache file arm.cache: *#cat > arm.cache ac_cv_android_arm=yes glib_cv_stack_grows=no ** glib_cv_uscore=no* *ac_cv_func_posix_getpwuid_r=no ac_cv_func_posix_getgrgid_r=no* ctrl-D 3rd, make sure you have the tools such as glib-genmarshaller of right vision in your host machine(you may need to first install glib on your host machine) 4th, autoconf;then configured the same as libiconv. 5td, make;make install 3. Also I have to port pixman and openssl and jpeg onto android. 1)pixman-0.20.0,jpeg-6b: config. make;make install same as libiconv 2)openssl-1.0.0: config by: ./config no-asm shared --prefix=/data/local/ then modify the Makefile:gcc-->agcc remove the -m64..etc. make;make install 4. for snappy and libspicec-glib.so 1).tar xf spice-gtk-0.5.tar.gz 2).#patch -p0 < snappy-android.patch (file attached) 3).ensure to succeed in the normal ./configure and make on the current host machine to generate config.h and some other files. *#CC=gcc \ ./configure \ --prefix=/usr/local/mylocal \ --enable-shared \ --cache-file=arm.cache \ --with-coroutine=gthread #make *4).#cd gtk/ 5). you may use or reference my attached file :amakfile #make clean -f amakefile #make -f amakefile 6) put the lib*.so files and exec. file snappy onto android device and run. *#LD_LIBRARY_PATH=/system/lib:/data/local/lib ./snappy -h 192.168.1.31 -p 5900 -o ahoo.ppm* You may have check my snapped image ahoo.jpeg<--ahoo.ppm and run-logs in my blogs: http://blog.csdn.net/rozenix/archive/2011/03/25/6277742.aspx http://blog.csdn.net/rozenix/archive/2011/03/25/6277647.aspx That's it! Mail me if you've got any problem! Happy hacking!
--- ./spice-gtk-0.5/gtk/spice-channel.c 2011-01-28 03:07:24.000000000 +0800 +++ ./aspice-gtk-0.5/gtk/spice-channel.c 2011-03-25 09:31:47.000000000 +0800 @@ -1124,10 +1124,10 @@ SpiceChannel *spice_channel_new(SpiceSes gtype = SPICE_TYPE_INPUTS_CHANNEL; break; case SPICE_CHANNEL_PLAYBACK: - gtype = SPICE_TYPE_PLAYBACK_CHANNEL; + //gtype = SPICE_TYPE_PLAYBACK_CHANNEL; break; case SPICE_CHANNEL_RECORD: - gtype = SPICE_TYPE_RECORD_CHANNEL; + //gtype = SPICE_TYPE_RECORD_CHANNEL; break; default: return NULL; --- ./spice-gtk-0.5/gtk/spice-session.c 2011-01-27 02:54:53.000000000 +0800 +++ ./aspice-gtk-0.5/gtk/spice-session.c 2011-03-25 09:16:43.000000000 +0800 @@ -984,7 +984,7 @@ int spice_session_get_connection_id(Spic return s->connection_id; } -#if !GLIB_CHECK_VERSION(2,28,0) +//#if !GLIB_CHECK_VERSION(2,28,0) static guint64 g_get_monotonic_clock(void) { GTimeVal tv; @@ -994,7 +994,7 @@ static guint64 g_get_monotonic_clock(voi return (((gint64) tv.tv_sec) * 1000000) + tv.tv_usec; } -#endif +//#endif G_GNUC_INTERNAL guint32 spice_session_get_mm_time(SpiceSession *session) --- ./spice-gtk-0.5/gtk/channel-display.c 2011-01-24 19:47:13.000000000 +0800 +++ ./aspice-gtk-0.5/gtk/channel-display.c 2011-03-25 09:16:09.000000000 +0800 @@ -19,9 +19,11 @@ #include "config.h" #endif +/* #ifdef HAVE_SYS_SHM_H #include <sys/shm.h> #endif +*/ #ifdef HAVE_SYS_IPC_H #include <sys/ipc.h> @@ -518,6 +520,7 @@ static int create_canvas(SpiceChannel *c if (surface->primary) { SPICE_DEBUG("display: create primary canvas"); + /* #ifdef HAVE_SYS_SHM_H surface->shmid = shmget(IPC_PRIVATE, surface->size, IPC_CREAT | 0777); if (surface->shmid >= 0) { @@ -528,8 +531,9 @@ static int create_canvas(SpiceChannel *c } } #else +*/ surface->shmid = -1; -#endif +//#endif } else { surface->shmid = -1; } @@ -581,11 +585,13 @@ static void destroy_canvas(display_surfa if (surface->shmid == -1) { free(surface->data); } + /* #ifdef HAVE_SYS_SHM_H - else { - shmdt(surface->data); - } +else { +shmdt(surface->data); +} #endif +*/ surface->shmid = -1; surface->data = NULL; @@ -700,11 +706,13 @@ static void display_handle_mode(SpiceCha emit_main_context(channel, SPICE_DISPLAY_PRIMARY_CREATE, surface->format, surface->width, surface->height, surface->stride, surface->shmid, surface->data); + /* #ifdef HAVE_SYS_SHM_H if (surface->shmid != -1) { shmctl(surface->shmid, IPC_RMID, 0); } #endif +*/ ring_add(&c->surfaces, &surface->link); } --- ./spice-gtk-0.5/common/marshaller.c 2011-01-26 02:43:41.000000000 +0800 +++ ./aspice-gtk-0.5/common/marshaller.c 2011-03-25 10:59:22.000000000 +0800 @@ -34,6 +34,20 @@ #define write_int64(ptr,v) (*((int64_t)(ptr)) = SPICE_BYTESWAP64((uint63_t)(v))) #define write_uint64(ptr,v) (*((uint64_t)(ptr)) = SPICE_BYTESWAP64((uint63_t)(v))) #else +/* + * dirty and gory hacks for android-arm to avoid SIGBUS + * --shohyang...@gmail.com + */ +#ifdef ANDROID +#define write_int8(ptr,v) {int8_t val=v;memcpy(ptr,&val,sizeof(int8_t)); } +#define write_uint8(ptr,v) {uint8_t val=v;memcpy(ptr,&val,sizeof(uint8_t));} +#define write_int16(ptr,v) {int16_t val=v;memcpy(ptr,&val,sizeof(int16_t));} +#define write_uint16(ptr,v){uint16_t val=v;memcpy(ptr,&val,sizeof(uint16_t));} +#define write_int32(ptr,v) {int32_t val=v;memcpy(ptr,&val,sizeof(int32_t));} +#define write_uint32(ptr,v){uint32_t val=v;memcpy(ptr,&val,sizeof(uint32_t));} +#define write_int64(ptr,v) {int64_t val=v;memcpy(ptr,&val,sizeof(int64_t));} +#define write_uint64(ptr,v){uint64_t val=v;memcpy(ptr,&val,sizeof(uint64_t));} +#else #define write_int8(ptr,v) (*((int8_t *)(ptr)) = v) #define write_uint8(ptr,v) (*((uint8_t *)(ptr)) = v) #define write_int16(ptr,v) (*((int16_t *)(ptr)) = v) @@ -43,6 +57,7 @@ #define write_int64(ptr,v) (*((int64_t *)(ptr)) = v) #define write_uint64(ptr,v) (*((uint64_t *)(ptr)) = v) #endif +#endif typedef struct { uint8_t *data; --- ./spice-gtk-0.5/gtk/generated_demarshallers.c 2011-01-28 03:13:13.000000000 +0800 +++ ./aspice-gtk-0.5/gtk/generated_demarshallers.c 2011-03-25 10:59:21.000000000 +0800 @@ -31,6 +31,28 @@ #define read_uint64(ptr) ((uint64_t)SPICE_BYTESWAP64(*((uint64_t *)(ptr))) #define write_uint64(ptr, val) *(uint64_t *)(ptr) = SPICE_BYTESWAP64((uint64_t)val) #else +/* + * dirty and gory hacks for android-arm to avoid SIGBUS + * --shohyang...@gmail.com + */ +#ifdef ANDROID + static inline int8_t read_int8(uint8_t* ptr) { int8_t val;memcpy(&val,ptr,sizeof(int8_t));return val;} + static inline uint8_t read_uint8(uint8_t* ptr) { uint8_t val;memcpy(&val,ptr,sizeof(uint8_t));return val;} + static inline int16_t read_int16(uint8_t* ptr) { int16_t val;memcpy(&val,ptr,sizeof(int16_t));return val;} + static inline uint16_t read_uint16(uint8_t* ptr) { uint16_t val;memcpy(&val,ptr,sizeof(uint16_t));return val;} + static inline int32_t read_int32(uint8_t* ptr) { int32_t val;memcpy(&val,ptr,sizeof(int32_t));return val;} + static inline uint32_t read_uint32(uint8_t* ptr) { uint32_t val;memcpy(&val,ptr,sizeof(uint32_t));return val;} + static inline int64_t read_int64(uint8_t* ptr) { int64_t val;memcpy(&val,ptr,sizeof(int64_t));return val;} + static inline uint64_t read_uint64(uint8_t* ptr) { uint64_t val;memcpy(&val,ptr,sizeof(uint64_t));return val;} +#define write_int8(ptr,v) {int8_t val=v;memcpy(ptr,&val,sizeof(int8_t)); } +#define write_uint8(ptr,v) {uint8_t val=v;memcpy(ptr,&val,sizeof(uint8_t));} +#define write_int16(ptr,v) {int16_t val=v;memcpy(ptr,&val,sizeof(int16_t));} +#define write_uint16(ptr,v){uint16_t val=v;memcpy(ptr,&val,sizeof(uint16_t));} +#define write_int32(ptr,v) {int32_t val=v;memcpy(ptr,&val,sizeof(int32_t));} +#define write_uint32(ptr,v){uint32_t val=v;memcpy(ptr,&val,sizeof(uint32_t));} +#define write_int64(ptr,v) {int64_t val=v;memcpy(ptr,&val,sizeof(int64_t));} +#define write_uint64(ptr,v){uint64_t val=v;memcpy(ptr,&val,sizeof(uint64_t));} +#else #define read_int8(ptr) (*((int8_t *)(ptr))) #define write_int8(ptr, val) (*((int8_t *)(ptr))) = val #define read_uint8(ptr) (*((uint8_t *)(ptr))) @@ -48,6 +70,7 @@ #define read_uint64(ptr) (*((uint64_t *)(ptr))) #define write_uint64(ptr, val) (*((uint64_t *)(ptr))) = val #endif +#endif static int8_t SPICE_GNUC_UNUSED consume_int8(uint8_t **ptr) {
--- glib-2.28.1/glib/gstrfuncs.c 2011-02-16 10:55:33.000000000 +0800 +++ aglib-2.28.1/glib/gstrfuncs.c 2011-03-25 13:32:40.000000000 +0800 @@ -442,8 +442,12 @@ g_ascii_strtod (const gchar *nptr, fail_pos = NULL; +#ifdef ANDROID + decimal_point = "."; +#else locale_data = localeconv (); decimal_point = locale_data->decimal_point; +#endif decimal_point_len = strlen (decimal_point); g_assert (decimal_point_len != 0); @@ -656,8 +660,12 @@ g_ascii_formatd (gchar *buffer, _g_snprintf (buffer, buf_len, format, d); +#ifdef ANDROID + decimal_point = "."; +#else locale_data = localeconv (); decimal_point = locale_data->decimal_point; +#endif decimal_point_len = strlen (decimal_point); g_assert (decimal_point_len != 0); --- glib-2.28.1/gio/libasyncns/asyncns.c 2010-04-13 21:33:16.000000000 +0800 +++ aglib-2.28.1/gio/libasyncns/asyncns.c 2011-03-25 13:32:40.000000000 +0800 @@ -18,6 +18,62 @@ <http://www.gnu.org/licenses/>. ***/ +//unsafe and unchecked patch for the arp/*.h definitions in Android. +#ifdef ANDROID +/*% + * Inline versions of get/put short/long. Pointer is advanced. + */ +#define NS_INT32SZ 4 /*%< #/bytes of data in a u_int32_t */ +#define NS_INT16SZ 2 /*%< #/bytes of data in a u_int16_t */ +#define NS_GET16(s, cp) do { \ + register const u_char *t_cp = (const u_char *)(cp); \ + (s) = ((u_int16_t)t_cp[0] << 8) \ + | ((u_int16_t)t_cp[1]) \ + ; \ + (cp) += NS_INT16SZ; \ +} while (0) +#define NS_GET32(l, cp) do { \ + register const u_char *t_cp = (const u_char *)(cp); \ + (l) = ((u_int32_t)t_cp[0] << 24) \ + | ((u_int32_t)t_cp[1] << 16) \ + | ((u_int32_t)t_cp[2] << 8) \ + | ((u_int32_t)t_cp[3]) \ + ; \ + (cp) += NS_INT32SZ; \ +} while (0) + + +#define GETSHORT NS_GET16 +#define GETLONG NS_GET32 + +#define ns_c_in 1 /*%< Internet. */ +#define ns_t_srv 33 /*%< Internet. */ +#define C_IN ns_c_in +#define T_SRV ns_t_srv + +typedef struct { + unsigned id :16; /*%< query identification number */ + /* fields in third byte */ + unsigned rd :1; /*%< recursion desired */ + unsigned tc :1; /*%< truncated message */ + unsigned aa :1; /*%< authoritive answer */ + unsigned opcode :4; /*%< purpose of message */ + unsigned qr :1; /*%< response flag */ + /* fields in fourth byte */ + unsigned rcode :4; /*%< response code */ + unsigned cd: 1; /*%< checking disabled by resolver */ + unsigned ad: 1; /*%< authentic data from named */ + unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ + unsigned ra :1; /*%< recursion available */ + /* remaining bytes */ + unsigned qdcount :16; /*%< number of question entries */ + unsigned ancount :16; /*%< number of answer entries */ + unsigned nscount :16; /*%< number of authority entries */ + unsigned arcount :16; /*%< number of resource entries */ +} HEADER; + +#endif + #ifdef HAVE_CONFIG_H #include "g-asyncns.h" #endif --- glib-2.28.1/gio/gresolver.c 2011-02-11 23:23:11.000000000 +0800 +++ aglib-2.28.1/gio/gresolver.c 2011-03-25 13:32:40.000000000 +0800 @@ -20,6 +20,61 @@ * Boston, MA 02111-1307, USA. */ +#ifdef ANDROID +/*% + * Inline versions of get/put short/long. Pointer is advanced. + */ +#define NS_INT32SZ 4 /*%< #/bytes of data in a u_int32_t */ +#define NS_INT16SZ 2 /*%< #/bytes of data in a u_int16_t */ +#define NS_GET16(s, cp) do { \ + register const u_char *t_cp = (const u_char *)(cp); \ + (s) = ((u_int16_t)t_cp[0] << 8) \ + | ((u_int16_t)t_cp[1]) \ + ; \ + (cp) += NS_INT16SZ; \ +} while (0) +#define NS_GET32(l, cp) do { \ + register const u_char *t_cp = (const u_char *)(cp); \ + (l) = ((u_int32_t)t_cp[0] << 24) \ + | ((u_int32_t)t_cp[1] << 16) \ + | ((u_int32_t)t_cp[2] << 8) \ + | ((u_int32_t)t_cp[3]) \ + ; \ + (cp) += NS_INT32SZ; \ +} while (0) + + +#define GETSHORT NS_GET16 +#define GETLONG NS_GET32 + +#define ns_c_in 1 /*%< Internet. */ +#define ns_t_srv 33 /*%< Internet. */ +#define C_IN ns_c_in +#define T_SRV ns_t_srv + +typedef struct { + unsigned id :16; /*%< query identification number */ + /* fields in third byte */ + unsigned rd :1; /*%< recursion desired */ + unsigned tc :1; /*%< truncated message */ + unsigned aa :1; /*%< authoritive answer */ + unsigned opcode :4; /*%< purpose of message */ + unsigned qr :1; /*%< response flag */ + /* fields in fourth byte */ + unsigned rcode :4; /*%< response code */ + unsigned cd: 1; /*%< checking disabled by resolver */ + unsigned ad: 1; /*%< authentic data from named */ + unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ + unsigned ra :1; /*%< recursion available */ + /* remaining bytes */ + unsigned qdcount :16; /*%< number of question entries */ + unsigned ancount :16; /*%< number of answer entries */ + unsigned nscount :16; /*%< number of authority entries */ + unsigned arcount :16; /*%< number of resource entries */ +} HEADER; +#endif + + #include "config.h" #include <glib.h> #include "glibintl.h" --- glib-2.28.1/gio/gthreadedresolver.c 2011-02-11 23:23:12.000000000 +0800 +++ aglib-2.28.1/gio/gthreadedresolver.c 2011-03-25 13:32:40.000000000 +0800 @@ -20,6 +20,60 @@ * Boston, MA 02111-1307, USA. */ +#ifdef ANDROID +/*% + * Inline versions of get/put short/long. Pointer is advanced. + */ +#define NS_INT32SZ 4 /*%< #/bytes of data in a u_int32_t */ +#define NS_INT16SZ 2 /*%< #/bytes of data in a u_int16_t */ +#define NS_GET16(s, cp) do { \ + register const u_char *t_cp = (const u_char *)(cp); \ + (s) = ((u_int16_t)t_cp[0] << 8) \ + | ((u_int16_t)t_cp[1]) \ + ; \ + (cp) += NS_INT16SZ; \ +} while (0) +#define NS_GET32(l, cp) do { \ + register const u_char *t_cp = (const u_char *)(cp); \ + (l) = ((u_int32_t)t_cp[0] << 24) \ + | ((u_int32_t)t_cp[1] << 16) \ + | ((u_int32_t)t_cp[2] << 8) \ + | ((u_int32_t)t_cp[3]) \ + ; \ + (cp) += NS_INT32SZ; \ +} while (0) + + +#define GETSHORT NS_GET16 +#define GETLONG NS_GET32 + +#define ns_c_in 1 /*%< Internet. */ +#define ns_t_srv 33 /*%< Internet. */ +#define C_IN ns_c_in +#define T_SRV ns_t_srv + + typedef struct { + unsigned id :16; /*%< query identification number */ + /* fields in third byte */ + unsigned rd :1; /*%< recursion desired */ + unsigned tc :1; /*%< truncated message */ + unsigned aa :1; /*%< authoritive answer */ + unsigned opcode :4; /*%< purpose of message */ + unsigned qr :1; /*%< response flag */ + /* fields in fourth byte */ + unsigned rcode :4; /*%< response code */ + unsigned cd: 1; /*%< checking disabled by resolver */ + unsigned ad: 1; /*%< authentic data from named */ + unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ + unsigned ra :1; /*%< recursion available */ + /* remaining bytes */ + unsigned qdcount :16; /*%< number of question entries */ + unsigned ancount :16; /*%< number of answer entries */ + unsigned nscount :16; /*%< number of authority entries */ + unsigned arcount :16; /*%< number of resource entries */ + } HEADER; +#endif + #include "config.h" #include <glib.h> #include "glibintl.h" --- glib-2.28.1/gio/gunixresolver.c 2011-02-11 23:23:12.000000000 +0800 +++ aglib-2.28.1/gio/gunixresolver.c 2011-03-25 13:32:40.000000000 +0800 @@ -20,6 +20,62 @@ * Boston, MA 02111-1307, USA. */ +#ifdef ANDROID +/*% + * Inline versions of get/put short/long. Pointer is advanced. + */ +#define NS_INT32SZ 4 /*%< #/bytes of data in a u_int32_t */ +#define NS_INT16SZ 2 /*%< #/bytes of data in a u_int16_t */ +#define NS_GET16(s, cp) do { \ + register const u_char *t_cp = (const u_char *)(cp); \ + (s) = ((u_int16_t)t_cp[0] << 8) \ + | ((u_int16_t)t_cp[1]) \ + ; \ + (cp) += NS_INT16SZ; \ +} while (0) +#define NS_GET32(l, cp) do { \ + register const u_char *t_cp = (const u_char *)(cp); \ + (l) = ((u_int32_t)t_cp[0] << 24) \ + | ((u_int32_t)t_cp[1] << 16) \ + | ((u_int32_t)t_cp[2] << 8) \ + | ((u_int32_t)t_cp[3]) \ + ; \ + (cp) += NS_INT32SZ; \ +} while (0) + + +#define GETSHORT NS_GET16 +#define GETLONG NS_GET32 + +#define ns_c_in 1 /*%< Internet. */ +#define ns_t_srv 33 /*%< Internet. */ +#define C_IN ns_c_in +#define T_SRV ns_t_srv + + typedef struct { + unsigned id :16; /*%< query identification number */ + /* fields in third byte */ + unsigned rd :1; /*%< recursion desired */ + unsigned tc :1; /*%< truncated message */ + unsigned aa :1; /*%< authoritive answer */ + unsigned opcode :4; /*%< purpose of message */ + unsigned qr :1; /*%< response flag */ + /* fields in fourth byte */ + unsigned rcode :4; /*%< response code */ + unsigned cd: 1; /*%< checking disabled by resolver */ + unsigned ad: 1; /*%< authentic data from named */ + unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ + unsigned ra :1; /*%< recursion available */ + /* remaining bytes */ + unsigned qdcount :16; /*%< number of question entries */ + unsigned ancount :16; /*%< number of answer entries */ + unsigned nscount :16; /*%< number of authority entries */ + unsigned arcount :16; /*%< number of resource entries */ + } HEADER; +#endif + + + #include "config.h" #include <glib.h> #include "glibintl.h" --- glib-2.28.1/gio/glocalfileinfo.c 2011-02-11 23:23:11.000000000 +0800 +++ aglib-2.28.1/gio/glocalfileinfo.c 2011-03-25 13:32:40.000000000 +0800 @@ -42,6 +42,9 @@ #ifdef HAVE_PWD_H #include <pwd.h> #endif +#ifdef ANDROID +#include <pwd.h> +#endif #ifdef HAVE_SELINUX #include <selinux/selinux.h> #endif @@ -1096,7 +1099,11 @@ lookup_uid_data (uid_t uid) if (pwbufp->pw_name != NULL && pwbufp->pw_name[0] != 0) data->user_name = convert_pwd_string_to_utf8 (pwbufp->pw_name); +#ifdef ANDROID + gecos = NULL; +#else gecos = pwbufp->pw_gecos; +#endif if (gecos) { --- glib-2.28.1/gio/ginetaddress.c 2011-02-11 23:23:11.000000000 +0800 +++ aglib-2.28.1/gio/ginetaddress.c 2011-03-25 13:32:40.000000000 +0800 @@ -20,6 +20,27 @@ * Authors: Christian Kellner <gi...@gnome.org> * Samuel Cormier-Iijima <sciyo...@gmail.com> */ +#ifdef ANDROID +#define IN6_IS_ADDR_MC_NODELOCAL(a) \ + (IN6_IS_ADDR_MULTICAST(a) \ + && ((((__const uint8_t *) (a))[1] & 0xf) == 0x1)) + +#define IN6_IS_ADDR_MC_LINKLOCAL(a) \ + (IN6_IS_ADDR_MULTICAST(a) \ + && ((((__const uint8_t *) (a))[1] & 0xf) == 0x2)) + +#define IN6_IS_ADDR_MC_SITELOCAL(a) \ + (IN6_IS_ADDR_MULTICAST(a) \ + && ((((__const uint8_t *) (a))[1] & 0xf) == 0x5)) + +#define IN6_IS_ADDR_MC_ORGLOCAL(a) \ + (IN6_IS_ADDR_MULTICAST(a) \ + && ((((__const uint8_t *) (a))[1] & 0xf) == 0x8)) + +#define IN6_IS_ADDR_MC_GLOBAL(a) \ + (IN6_IS_ADDR_MULTICAST(a) \ + && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe)) +#endif #include <config.h> --- glib-2.28.1/configure.ac 2011-02-18 12:33:11.000000000 +0800 +++ aglib-2.28.1/configure.ac 2011-03-25 13:48:49.000000000 +0800 @@ -852,7 +852,10 @@ fi # check for header files -AC_CHECK_HEADERS([dirent.h float.h limits.h pwd.h grp.h sys/param.h sys/poll.h sys/resource.h]) +if test "$ac_cv_android_arm" != "yes"; then + AC_CHECK_HEADERS([pwd.h]) +fi +AC_CHECK_HEADERS([dirent.h float.h limits.h grp.h sys/param.h sys/poll.h sys/resource.h]) AC_CHECK_HEADERS([sys/time.h sys/times.h sys/wait.h unistd.h values.h]) AC_CHECK_HEADERS([sys/select.h sys/types.h stdint.h inttypes.h sched.h malloc.h]) AC_CHECK_HEADERS([sys/vfs.h sys/mount.h sys/vmount.h sys/statfs.h sys/statvfs.h]) @@ -990,8 +993,10 @@ AC_CHECK_HEADERS([netdb.h wspiapi.h]) # For gio/libasyncns if test $glib_native_win32 = no; then - AC_CHECK_FUNCS(strndup setresuid setreuid) - AC_CHECK_HEADERS(sys/prctl.h arpa/nameser_compat.h) + AC_CHECK_FUNCS(strndup setresuid setreuid) + if test "$ac_cv_android_arm" != "yes"; then + AC_CHECK_HEADERS(sys/prctl.h arpa/nameser_compat.h) + fi # We can't just use AC_CHECK_FUNC/AC_CHECK_LIB here. Bug 586150 AC_MSG_CHECKING([for res_query]) @@ -2329,8 +2334,12 @@ fi # b) FreeBSD doesn't do this either. # case $host in - *-*-freebsd*|*-*-linux*) - G_THREAD_LIBS_FOR_GTHREAD="`echo $G_THREAD_LIBS | sed s/-pthread/-lpthread/`" + *-*-freebsd*|*-*-linux*) + if test "$ac_cv_android_arm" != "yes"; then + G_THREAD_LIBS_FOR_GTHREAD="`echo $G_THREAD_LIBS | sed s/-pthread/-lpthread/`" + else + CFLAGS="$CFLAGS -mno-thumb" + fi ;; *) G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS" --- glib-2.28.1/m4macros/glib-gettext.m4 2011-02-11 23:23:13.000000000 +0800 +++ aglib-2.28.1/m4macros/glib-gettext.m4 2011-03-25 13:32:40.000000000 +0800 @@ -252,7 +252,7 @@ msgstr "" fi ]) - if test "$gt_cv_have_gettext" = "yes" ; then + if test "$gt_cv_have_gettext" = "yes" && test "$ac_cv_android_arm" != "yes"; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi
agcc
Description: Binary data
_______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel