[droid] Support building for android #30

Merged
merged 1 commit into from Nov 29, 2012

Projects

None yet

3 participants

@theuni
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
untested.
252aa90
@theuni
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
@Memphiz
Contributor

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 ;).

@sahlberg
Owner

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
HAVE_XXX_YYY

Owner

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>

endif

anymore.

You should be able to use

ifdef HAVE_SYS_TIME_H

include <sys/time.h>

endif

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