From 53058d500b4cc9c76cb27c49352fb9d38d39fae6 Mon Sep 17 00:00:00 2001 From: Andrei Vasiliu Date: Tue, 1 Mar 2016 15:58:05 +0000 Subject: [PATCH] java: Included jni.h in an external header The reason for this is that applications that use mraa, like upm, need the definitions contained in jni header. Signed-off-by: Andrei Vasiliu Signed-off-by: Brendan Le Foll --- api/mraa/gpio.h | 7 +++++++ api/mraa/gpio.hpp | 7 ------- include/java/mraajni.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/mraa/gpio.h b/api/mraa/gpio.h index ef14734..a920df2 100644 --- a/api/mraa/gpio.h +++ b/api/mraa/gpio.h @@ -44,6 +44,13 @@ extern "C" { #include #include "common.h" +#if defined(SWIGJAVA) || defined(JAVACALLBACK) +#include +extern "C" { + void mraa_java_isr_callback(void *args); +} +#endif + /** * Opaque pointer definition to the internal struct _gpio */ diff --git a/api/mraa/gpio.hpp b/api/mraa/gpio.hpp index cdcb0ba..98693ac 100644 --- a/api/mraa/gpio.hpp +++ b/api/mraa/gpio.hpp @@ -28,13 +28,6 @@ #include "types.hpp" #include -#if defined(SWIGJAVA) || defined(JAVACALLBACK) -extern "C" { - void mraa_java_isr_callback(void *args); -} -#endif - - #if defined(SWIGJAVASCRIPT) #if NODE_MODULE_VERSION >= 0x000D #include diff --git a/include/java/mraajni.h b/include/java/mraajni.h index 27051a6..887b9c5 100644 --- a/include/java/mraajni.h +++ b/include/java/mraajni.h @@ -28,7 +28,7 @@ extern "C" { #endif -#include "jni.h" +#include #include "mraa/types.h" // location for defining JNI version to use