- No way to get the path of an executable at runtime.
- Add support for boost 1.73.

Index: src/cpp/core/system/PosixSystem.cpp
--- src/cpp/core/system/PosixSystem.cpp.orig
+++ src/cpp/core/system/PosixSystem.cpp
@@ -23,6 +23,7 @@
 
 #include <boost/algorithm/string.hpp>
 #include <boost/range/as_array.hpp>
+#include <boost/bind.hpp>
 
 #include <signal.h>
 #include <fcntl.h>
@@ -47,13 +48,18 @@
 #include <gsl/gsl>
 #endif
 
-#ifndef __APPLE__
+#ifndef __OpenBSD__
 #include <sys/prctl.h>
 #include <sys/sysinfo.h>
 #include <linux/kernel.h>
 #include <dirent.h>
 #endif
 
+#ifdef __OpenBSD__
+#include <netinet/in.h>
+#include <dirent.h>
+#endif
+
 #include <boost/thread.hpp>
 #include <boost/format.hpp>
 #include <boost/lexical_cast.hpp>
@@ -926,9 +932,8 @@ Error executablePath(const char * argv0,
    // need to also search the PATH for the exe name in argv[0]
    //
 
-   // use argv[0] and initial path
-   FilePath initialPath = FilePath::initialPath();
-   executablePath = initialPath.completePath(argv0).getAbsolutePath();
+   // XXX: OpenBSD: assume localbase
+   executablePath = std::string("LOCALBASE/lib/rstudio/bin/rstudio");
 
 #endif
 
@@ -1405,9 +1410,11 @@ Error osResourceLimit(ResourceLimit limit, int* pLimit
 {
    switch(limit)
    {
+#ifndef __OpenBSD__
       case MemoryLimit:
          *pLimit = RLIMIT_AS;
          break;
+#endif
       case FilesLimit:
          *pLimit = RLIMIT_NOFILE;
          break;
@@ -1426,7 +1433,7 @@ Error osResourceLimit(ResourceLimit limit, int* pLimit
       case CpuLimit:
          *pLimit = RLIMIT_CPU;
          break;
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__OpenBSD__)
       case NiceLimit:
          *pLimit = RLIMIT_NICE;
          break;
@@ -1499,7 +1506,7 @@ Error systemInformation(SysInfo* pSysInfo)
 {
    pSysInfo->cores = boost::thread::hardware_concurrency();
 
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__OpenBSD__)
    struct sysinfo info;
    if (::sysinfo(&info) == -1)
       return systemError(errno, ERROR_LOCATION);
@@ -1939,7 +1946,7 @@ Error restrictCoreDumps()
       return error;
 
    // no ptrace core dumps permitted
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__OpenBSD__)
    int res = ::prctl(PR_SET_DUMPABLE, 0);
    if (res == -1)
       return systemError(errno, ERROR_LOCATION);
@@ -1950,7 +1957,7 @@ Error restrictCoreDumps()
 
 Error enableCoreDumps()
 {
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__OpenBSD__)
    int res = ::prctl(PR_SET_DUMPABLE, 1);
    if (res == -1)
       return systemError(errno, ERROR_LOCATION);
@@ -1976,7 +1983,7 @@ void printCoreDumpable(const std::string& context)
    ostr << "  hard limit: " << rLimitHard << std::endl;
 
    // ptrace
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__OpenBSD__)
    int dumpable = ::prctl(PR_GET_DUMPABLE, nullptr, nullptr, nullptr, nullptr);
    if (dumpable == -1)
       LOG_ERROR(systemError(errno, ERROR_LOCATION));
