Skip to content

Commit f7f1fe5

Browse files
committed
Build the systemconf library on all platforms (openjdk#7)
Build the systemconf library on all platforms, simply returning JNI_FALSE if !LINUX Reviewed-by: @franferrax
1 parent a3bc14a commit f7f1fe5

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

make/modules/java.base/Lib.gmk

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -174,19 +174,17 @@ ifeq ($(USE_SYSCONF_NSS), true)
174174
LIBSYSTEMCONF_CXXFLAGS += $(NSS_CFLAGS) -DSYSCONF_NSS
175175
endif
176176

177-
ifeq ($(OPENJDK_BUILD_OS), linux)
178-
$(eval $(call SetupJdkLibrary, BUILD_LIBSYSTEMCONF, \
179-
NAME := systemconf, \
180-
OPTIMIZATION := LOW, \
181-
CFLAGS := $(CFLAGS_JDKLIB) $(LIBSYSTEMCONF_CFLAGS), \
182-
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBSYSTEMCONF_CXXFLAGS), \
183-
LDFLAGS := $(LDFLAGS_JDKLIB) \
184-
$(call SET_SHARED_LIBRARY_ORIGIN), \
185-
LIBS_unix := $(LIBDL) $(NSS_LIBS), \
186-
))
177+
$(eval $(call SetupJdkLibrary, BUILD_LIBSYSTEMCONF, \
178+
NAME := systemconf, \
179+
OPTIMIZATION := LOW, \
180+
CFLAGS := $(CFLAGS_JDKLIB) $(LIBSYSTEMCONF_CFLAGS), \
181+
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBSYSTEMCONF_CXXFLAGS), \
182+
LDFLAGS := $(LDFLAGS_JDKLIB) \
183+
$(call SET_SHARED_LIBRARY_ORIGIN), \
184+
LIBS_unix := $(LIBDL) $(NSS_LIBS), \
185+
))
187186

188-
TARGETS += $(BUILD_LIBSYSTEMCONF)
189-
endif
187+
TARGETS += $(BUILD_LIBSYSTEMCONF)
190188

191189
################################################################################
192190
# Create the symbols file for static builds.

src/java.base/linux/native/libsystemconf/systemconf.c renamed to src/java.base/share/native/libsystemconf/systemconf.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#include "jvm_md.h"
2929
#include <stdio.h>
3030

31+
#ifdef LINUX
32+
3133
#ifdef SYSCONF_NSS
3234
#include <nss3/pk11pub.h>
3335
#else
@@ -222,3 +224,13 @@ JNIEXPORT jboolean JNICALL Java_java_security_SystemConfigurator_getSystemFIPSEn
222224
return (fips_enabled == '1' ? JNI_TRUE : JNI_FALSE);
223225
}
224226
}
227+
228+
#else // !LINUX
229+
230+
JNIEXPORT jboolean JNICALL Java_java_security_SystemConfigurator_getSystemFIPSEnabled
231+
(JNIEnv *env, jclass cls)
232+
{
233+
return JNI_FALSE;
234+
}
235+
236+
#endif

0 commit comments

Comments
 (0)