From 77ca420f77dddfd2b747cf8c9bd1ecb968ea59a5 Mon Sep 17 00:00:00 2001 From: joncruz Date: Mon, 10 Mar 2008 08:18:59 +0000 Subject: [PATCH] Fixed stat include --- src/bind/javabind.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/bind/javabind.cpp b/src/bind/javabind.cpp index 2710efcda..1786dc731 100644 --- a/src/bind/javabind.cpp +++ b/src/bind/javabind.cpp @@ -1,6 +1,6 @@ /** * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. + * to all of the nice things that can be layered upon that. * * Authors: * Bob Jamison @@ -43,6 +43,10 @@ #include #endif +#if HAVE_SYS_STAT_H +#include +#endif + #include "javabind.h" #include "javabind-private.h" #include @@ -251,7 +255,7 @@ static CreateVMFunc getCreateVMFunc() char verbuf[16]; char regpath[80]; strcpy(regpath, "SOFTWARE\\JavaSoft\\Java Runtime Environment"); - bool ret = getRegistryString(HKEY_LOCAL_MACHINE, + bool ret = getRegistryString(HKEY_LOCAL_MACHINE, regpath, "CurrentVersion", verbuf, 15); if (!ret) { @@ -262,7 +266,7 @@ static CreateVMFunc getCreateVMFunc() strcat(regpath, verbuf); //msg("reg path: %s\n", regpath); char libname[80]; - ret = getRegistryString(HKEY_LOCAL_MACHINE, + ret = getRegistryString(HKEY_LOCAL_MACHINE, regpath, "RuntimeLib", libname, 79); if (!ret) { @@ -312,7 +316,7 @@ static void getJavaRoot(String &javaroot) /** * Recursively descend into a directory looking for libjvm.so - */ + */ static bool findJVMRecursive(const String &dirpath, std::vector &results) { @@ -345,7 +349,7 @@ static bool findJVMRecursive(const String &dirpath, if (finfo.st_mode & S_IFDIR) { ret |= findJVMRecursive(path, results); - } + } } closedir(dir); return ret; @@ -363,7 +367,7 @@ static const char *commonJavaPaths[] = /** * Look for a Java VM (libjvm.so) in several Unix places - */ + */ static bool findJVM(String &result) { std::vector results; @@ -480,7 +484,7 @@ static void populateClassPath(const String &javaroot, cp.append(path); } closedir(dir); - + result = cp; return; -- 2.30.2