< prev index next >
src/jdk.jdwp.agent/share/native/libjdwp/transport.c
Print this page
@@ -1,7 +1,7 @@
/*
- * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -99,13 +99,14 @@
/* Load transport library (directory=="" means do system search) */
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 */
plibdir = NULL;
if ( libdir != NULL ) {
@@ -123,10 +124,13 @@
}
/* dlopen (unix) / LoadLibrary (windows) the transport library */
handle = dbgsysLoadLibrary(libname, buf, sizeof(buf));
return handle;
+#else
+ return (dbgsysLoadLibrary(NULL, buf, sizeof(buf)));
+#endif
}
/*
* loadTransport() is adapted from loadJVMHelperLib() in
* JDK 1.2 javai.c v1.61
< prev index next >