japi: fix compilation on 32-bit systems

Change-Id: Ia7cb986544a13cc17b43b2f0948482deb02e8fb5
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vpp-api/java/jvpp-acl/jvpp_acl.c b/src/vpp-api/java/jvpp-acl/jvpp_acl.c
index 0375356..f5467e9 100644
--- a/src/vpp-api/java/jvpp-acl/jvpp_acl.c
+++ b/src/vpp-api/java/jvpp-acl/jvpp_acl.c
@@ -47,7 +47,7 @@
   clib_warning ("Java_io_fd_vpp_jvpp_acl_JVppAclImpl_init0");
 
   plugin_main->my_client_index = my_client_index;
-  plugin_main->vl_input_queue = (unix_shared_memory_queue_t *)queue_address;
+  plugin_main->vl_input_queue = uword_to_pointer (queue_address, unix_shared_memory_queue_t *);
 
   plugin_main->callbackObject = (*env)->NewGlobalRef(env, callback);
   plugin_main->callbackClass = (jclass)(*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, callback));
diff --git a/src/vpp-api/java/jvpp-core/jvpp_core.c b/src/vpp-api/java/jvpp-core/jvpp_core.c
index 627bc10..e57c62a 100644
--- a/src/vpp-api/java/jvpp-core/jvpp_core.c
+++ b/src/vpp-api/java/jvpp-core/jvpp_core.c
@@ -50,7 +50,7 @@
 (JNIEnv * env, jclass clazz, jobject callback, jlong queue_address, jint my_client_index) {
     core_main_t * plugin_main = &core_main;
     plugin_main->my_client_index = my_client_index;
-    plugin_main->vl_input_queue = (unix_shared_memory_queue_t *)queue_address;
+    plugin_main->vl_input_queue = uword_to_pointer (queue_address, unix_shared_memory_queue_t *);
 
     plugin_main->callbackObject = (*env)->NewGlobalRef(env, callback);
     plugin_main->callbackClass = (jclass)(*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, callback));
diff --git a/src/vpp-api/java/jvpp-ioamexport/jvpp_ioam_export.c b/src/vpp-api/java/jvpp-ioamexport/jvpp_ioam_export.c
index 9131ccb..cf4499d 100644
--- a/src/vpp-api/java/jvpp-ioamexport/jvpp_ioam_export.c
+++ b/src/vpp-api/java/jvpp-ioamexport/jvpp_ioam_export.c
@@ -47,7 +47,7 @@
   clib_warning ("Java_io_fd_vpp_jvpp_ioamexport_JVppIoamexportImpl_init0");
 
   plugin_main->my_client_index = my_client_index;
-  plugin_main->vl_input_queue = (unix_shared_memory_queue_t *)queue_address;
+  plugin_main->vl_input_queue = uword_to_pointer (queue_address, unix_shared_memory_queue_t *);
 
   plugin_main->callbackObject = (*env)->NewGlobalRef(env, callback);
   plugin_main->callbackClass = (jclass)(*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, callback));
diff --git a/src/vpp-api/java/jvpp-ioampot/jvpp_ioam_pot.c b/src/vpp-api/java/jvpp-ioampot/jvpp_ioam_pot.c
index 5f28344..8f39698 100644
--- a/src/vpp-api/java/jvpp-ioampot/jvpp_ioam_pot.c
+++ b/src/vpp-api/java/jvpp-ioampot/jvpp_ioam_pot.c
@@ -47,7 +47,7 @@
   clib_warning ("Java_io_fd_vpp_jvpp_ioampot_JVppIoampotImpl_init0");
 
   plugin_main->my_client_index = my_client_index;
-  plugin_main->vl_input_queue = (unix_shared_memory_queue_t *)queue_address;
+  plugin_main->vl_input_queue = uword_to_pointer (queue_address, unix_shared_memory_queue_t *);
 
   plugin_main->callbackObject = (*env)->NewGlobalRef(env, callback);
   plugin_main->callbackClass = (jclass)(*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, callback));
diff --git a/src/vpp-api/java/jvpp-ioamtrace/jvpp_ioam_trace.c b/src/vpp-api/java/jvpp-ioamtrace/jvpp_ioam_trace.c
index 1c470b5..f53937e 100644
--- a/src/vpp-api/java/jvpp-ioamtrace/jvpp_ioam_trace.c
+++ b/src/vpp-api/java/jvpp-ioamtrace/jvpp_ioam_trace.c
@@ -47,7 +47,7 @@
   clib_warning ("Java_io_fd_vpp_jvpp_ioamtrace_JVppIoamtraceImpl_init0");
 
   plugin_main->my_client_index = my_client_index;
-  plugin_main->vl_input_queue = (unix_shared_memory_queue_t *)queue_address;
+  plugin_main->vl_input_queue = uword_to_pointer (queue_address, unix_shared_memory_queue_t *);
 
   plugin_main->callbackObject = (*env)->NewGlobalRef(env, callback);
   plugin_main->callbackClass = (jclass)(*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, callback));
diff --git a/src/vpp-api/java/jvpp-registry/jvpp_registry.c b/src/vpp-api/java/jvpp-registry/jvpp_registry.c
index add872d..66adfea 100644
--- a/src/vpp-api/java/jvpp-registry/jvpp_registry.c
+++ b/src/vpp-api/java/jvpp-registry/jvpp_registry.c
@@ -309,7 +309,7 @@
     (*env)->ReleaseStringUTFChars(env, clientName, client_name);
 
     return (*env)->NewObject(env, connectionInfoClass,
-            connectionInfoConstructor, (jlong) jm->vl_input_queue,
+            connectionInfoConstructor, (jlong) pointer_to_uword (jm->vl_input_queue),
             (jint) jm->my_client_index, (jint) rv);
 }
 
diff --git a/src/vpp-api/java/jvpp-snat/jvpp_snat.c b/src/vpp-api/java/jvpp-snat/jvpp_snat.c
index e994cdb..5fd6a88 100644
--- a/src/vpp-api/java/jvpp-snat/jvpp_snat.c
+++ b/src/vpp-api/java/jvpp-snat/jvpp_snat.c
@@ -47,7 +47,7 @@
   clib_warning ("Java_io_fd_vpp_jvpp_snat_JVppSnatImpl_init0");
 
   plugin_main->my_client_index = my_client_index;
-  plugin_main->vl_input_queue = (unix_shared_memory_queue_t *)queue_address;
+  plugin_main->vl_input_queue = uword_to_pointer (queue_address, unix_shared_memory_queue_t *);
 
   plugin_main->callbackObject = (*env)->NewGlobalRef(env, callback);
   plugin_main->callbackClass = (jclass)(*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, callback));