I used this answer (https://stackoverflow.com/a/10965262/3178688) to get an executable successfully building as part of my Android application. I then tried to add a header file:
#include <linux/mmc/ioctl.h>
And the compilation starting failing with:
jni/mmc.c:1:29: fatal error: linux/mmc/ioctl.h: No such file or directory
This seemed to have something to do with the target platform, as this file is present in android-ndk/platforms/android-21/arch-*/usr/include/linux/mmc/ioctl.h
but not in earlier platforms. I tried changing my minSdkVersion and targetSdkVersion in my app's build.gradle to 21 to no avail. I also tried including TARGET_PLATFORM=android-21
in my native code's Android.mk, also to no avail. How can I get the build system to see the android-ndk/platforms/android-21/arch-*/usr/include/linux/mmc/ioctl.h
that is definitely there in my ndk?