Add macOS support #34
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
2
support/3rd_party/libsodium_configure.sh
vendored
2
support/3rd_party/libsodium_configure.sh
vendored
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$1" == "mingw64" ]; then
|
||||
HOST_CFG=--host=x86_64-w64-mingw32
|
||||
|
@@ -55,8 +55,11 @@ auto change_to_process_directory() -> bool {
|
||||
std::string path;
|
||||
path.resize(PATH_MAX + 1);
|
||||
#if defined(__APPLE__)
|
||||
auto res =proc_pidpath(getpid(), reinterpret_cast<void *>(path.data()),
|
||||
static_cast<uint32_t>(path.size()));
|
||||
auto res = proc_pidpath(getpid(), reinterpret_cast<void *>(path.data()),
|
||||
static_cast<uint32_t>(path.size()));
|
||||
if (res == 0) {
|
||||
path = utils::path::get_parent_path(path) :
|
||||
}
|
||||
#else // !defined(__APPLE__)
|
||||
auto res = readlink("/proc/self/exe", path.data(), path.size());
|
||||
if (res == -1) {
|
||||
|
Reference in New Issue
Block a user