From 4d4b77e5b6b923507ec4a0ad9d5c7018e4542a3c Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 21 May 2014 21:41:23 -0700 Subject: [PATCH] cephfs-java: build against older jni headers Older versions of the JNI interface expected non-const parameters to their memory move functions. It's unpleasant, but won't actually change the memory in question, to do a cast_const in order to satisfy those older headers. (And even if it *did* modify the memory, that would be okay given our single user.) Signed-off-by: Greg Farnum --- src/java/native/libcephfs_jni.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/native/libcephfs_jni.cc b/src/java/native/libcephfs_jni.cc index 189743d69900..a96b20d95598 100644 --- a/src/java/native/libcephfs_jni.cc +++ b/src/java/native/libcephfs_jni.cc @@ -2875,7 +2875,7 @@ jobject sockaddrToInetAddress(JNIEnv* env, const sockaddr_storage& ss, jint* por return NULL; } env->SetByteArrayRegion(byteArray.get(), 0, addressLength, - reinterpret_cast(rawAddress)); + reinterpret_cast(const_cast(rawAddress))); if (ss.ss_family == AF_UNIX) { // Note that we get here for AF_UNIX sockets on accept(2). The unix(7) man page claims -- 2.47.3