Patch for Solaris support, mostly ifdefs and header files, plus adds libevent configuration.
BUG=30101
TEST=compiles
Review URL: http://codereview.chromium.org/7238021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90494 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/base/base_paths_linux.cc b/base/base_paths_linux.cc
index 2ee690d..9f940cb9 100644
--- a/base/base_paths_linux.cc
+++ b/base/base_paths_linux.cc
@@ -19,14 +19,14 @@
#if defined(OS_FREEBSD)
#include <sys/param.h>
#include <sys/sysctl.h>
+#elif defined(OS_SOLARIS)
+#include <stdlib.h>
#endif
namespace base {
#if defined(OS_LINUX)
const char kSelfExe[] = "/proc/self/exe";
-#elif defined(OS_SOLARIS)
-const char kSelfExe[] = getexecname();
#endif
// The name of this file relative to the source root. This is used for checking
@@ -58,6 +58,14 @@
bin_dir[strlen(bin_dir)] = 0;
*result = FilePath(bin_dir);
return true;
+#elif defined(OS_SOLARIS)
+ char bin_dir[PATH_MAX + 1];
+ if (realpath(getexecname(), bin_dir) == NULL) {
+ NOTREACHED() << "Unable to resolve " << getexecname() << ".";
+ return false;
+ }
+ *result = FilePath(bin_dir);
+ return true;
#endif
}
case base::DIR_SOURCE_ROOT: {