--- a/jdk/src/jdk.jdwp.agent/share/native/libjdwp/transport.c Thu Oct 15 14:41:37 2015 +0100
+++ b/jdk/src/jdk.jdwp.agent/share/native/libjdwp/transport.c Mon Oct 19 13:41:09 2015 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -101,9 +101,10 @@
static void *
loadTransportLibrary(const char *libdir, const char *name)
{
+ char buf[MAXPATHLEN*2+100];
+#ifndef STATIC_BUILD
void *handle;
char libname[MAXPATHLEN+2];
- char buf[MAXPATHLEN*2+100];
const char *plibdir;
/* Convert libdir from UTF-8 to platform encoding */
@@ -125,6 +126,9 @@
/* dlopen (unix) / LoadLibrary (windows) the transport library */
handle = dbgsysLoadLibrary(libname, buf, sizeof(buf));
return handle;
+#else
+ return (dbgsysLoadLibrary(NULL, buf, sizeof(buf)));
+#endif
}
/*