libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Patches to build libmicrohttpd on Android


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Patches to build libmicrohttpd on Android
Date: Thu, 08 Nov 2012 19:14:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.10) Gecko/20121027 Icedove/10.0.10

Dear Jan,

Totally reasonable patches, except for your de-capitalization of the TSEARCH (and related calls):

   /* Search for the IP address */
-  if (NULL == (nodep = TSEARCH (key,
+  if (NULL == (nodep = tsearch (key,

This would break our W32 build.

I'll try to find some time later tonight to patch things up, update docs, etc. and then this will hit SVN HEAD.

Thanks for the patches!

Happy hacking!


-Christian

On 11/08/2012 04:33 PM, Jan Janak wrote:
Christian,

Please find attached three patches that, when applied, make it
possible to build libmicrohttpd on Android using the Android Native
Development Kit (NDK). That makes it possible to embed libmicrohttpd
as a native library into Android apps.

The Android system is Linux with a stripped down version of libc. The
first two patches are trivial, they just replace config.guess and
config.sub with the most recent version available from the autoconf
repository. This is needed for the build system to recognize that it
is being built on the Android Platform.

The third patch changes the way how libmicrohttpd detects and uses
tsearch, tfind, and tdestroy. The configure script checks for the
presence of the search.h header field and if it is not available, it
enables and compiles a built-in version of those functions. I took the
built-in version from FreeBSD. This patch is needed because the libc
library on Android (based on Bionic) does not implement those
functions.

Please consider including those patches into a future release of
libmicrohttpd. You can then also add Android to the list of supported
platforms on the website. Thanks!

-Jan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]