$NetBSD: patch-bf,v 1.2 2011/08/21 22:57:55 tnn Exp $ --- jdk/src/solaris/bin/java_md.c.orig 2011-08-20 11:24:21.000000000 +0000 +++ jdk/src/solaris/bin/java_md.c @@ -100,7 +100,7 @@ extern char **environ; * A collection of useful strings. One should think of these as #define * entries, but actual strings can be more efficient (with many compilers). */ -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__DragonFly__) static const char *system_dir = PACKAGE_PATH "/openjdk7"; static const char *user_dir = "/java"; #elif defined(__NetBSD__) @@ -335,6 +335,10 @@ RequiresSetenv(int wanted, const char *j char *dmllp = NULL; char *p; /* a utility pointer */ +#if defined(__NetBSD__) || defined(__DragonFly__) + /* We always need this, since there's no $ORIGIN support in rtld. */ + return JNI_TRUE; +#endif llp = getenv("LD_LIBRARY_PATH"); #ifdef __solaris__ dmllp = (CURRENT_DATA_MODEL == 32)