[droid] Support building for android #30

merged 1 commit into from Nov 29, 2012


None yet

3 participants

theuni commented Nov 28, 2012

I made no attempt at correctness here, this was just an effort to get it building. Feel free to tidy/rearrange as necessary.

Cory Fields [droid] Support building for android
These are the changes necessary to build for android. Working status is yet
theuni commented Nov 28, 2012

Update: It works too.

If this makes it in for the next release, I'll bump libnfs for xbmc+android to match, and we'll have nfs support there :)

@sahlberg sahlberg merged commit 717cc58 into sahlberg:master Nov 29, 2012

Test compiling libnfs 1.6 on osx/ios i stumbled over that. We have a patch in xbmc removing the ifdef for android here since other platforms need sys/time.h aswell. Not sure if it is available on windows too.

But for beeing able to compile we need to include <sys/time.h>. Something to be considered for next version of libnfs so we can get rid of that patch ;).


Does androind use configure ?
If so the right thing to clean up the ifdef-include mess is probably to put
both sys/time.h and netinet/in.h inside


The ifdef-include has been a mess for a while but i have cleaned some of it up.

You shouldnt need

if defined(ANDROID)

include <sys/time.h>



You should be able to use


include <sys/time.h>


in those .c files where you need it.

You can also get rid of this line
+#include <netinet/in.h>
since it is now included via a #ifdef HAVE_NETINET_IN_H in the files where needed.

Could you update the patch and then I will merge it into master for next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment