Mercurial > hg > truffle
diff src/share/vm/runtime/os.cpp @ 3960:f08d439fab8c
7089790: integrate bsd-port changes
Reviewed-by: kvn, twisti, jrose
Contributed-by: Kurt Miller <kurt@intricatesoftware.com>, Greg Lewis <glewis@eyesbeyond.com>, Jung-uk Kim <jkim@freebsd.org>, Christos Zoulas <christos@zoulas.com>, Landon Fuller <landonf@plausible.coop>, The FreeBSD Foundation <board@freebsdfoundation.org>, Michael Franz <mvfranz@gmail.com>, Roger Hoover <rhoover@apple.com>, Alexander Strange <astrange@apple.com>
author | never |
---|---|
date | Sun, 25 Sep 2011 16:03:29 -0700 |
parents | 9f12ede5571a |
children | 436b4a3231bf |
line wrap: on
line diff
--- a/src/share/vm/runtime/os.cpp Tue Sep 20 23:50:16 2011 -0700 +++ b/src/share/vm/runtime/os.cpp Sun Sep 25 16:03:29 2011 -0700 @@ -60,6 +60,10 @@ # include "os_windows.inline.hpp" # include "thread_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_bsd +# include "os_bsd.inline.hpp" +# include "thread_bsd.inline.hpp" +#endif # include <signal.h> @@ -116,7 +120,11 @@ assert(false, "Failed localtime_pd"); return NULL; } +#if defined(_ALLBSD_SOURCE) + const time_t zone = (time_t) time_struct.tm_gmtoff; +#else const time_t zone = timezone; +#endif // If daylight savings time is in effect, // we are 1 hour East of our time zone @@ -384,6 +392,13 @@ if (_native_java_library == NULL) { vm_exit_during_initialization("Unable to load native library", ebuf); } + +#if defined(__OpenBSD__) + // Work-around OpenBSD's lack of $ORIGIN support by pre-loading libnet.so + // ignore errors + dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), "net"); + dll_load(buffer, ebuf, sizeof(ebuf)); +#endif } static jboolean onLoaded = JNI_FALSE; if (onLoaded) {