Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/btllib/process_pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,12 @@ set_pipepath_prefix()
{
struct stat info
{};
if ((stat("/dev/shm", &info) == 0) && ((info.st_mode & S_IFMT) == S_IFDIR)) {
#if defined(__linux__)
const bool is_linux = true;
#else
const bool is_linux = false;
#endif
if (is_linux && (stat("/dev/shm", &info) == 0) && ((info.st_mode & S_IFMT) == S_IFDIR)) {
pipepath_prefix = "/dev/shm/";
} else {
const auto* const tmpdir =
Expand Down
2 changes: 1 addition & 1 deletion src/btllib/status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ get_strerror()
char buf[buflen];
// POSIX and GNU implementation of strerror_r differ, even in function signature
// and so we need to check which one is used
#if __APPLE__ || \
#if __APPLE__ || __FreeBSD__ || \
((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE)
strerror_r(errno, buf, buflen);
return buf;
Expand Down
Loading