Skip to content
Permalink
Browse files

NetBSD build fix proposal. (#10308)

Fixing thread naming call and let the class setting RANDOM_MIN/RANDOM_MAX.
  • Loading branch information
devnexen committed Aug 25, 2020
1 parent 44c9808 commit b262184acf34896f36b4270aba29546fc5b0e65b
Showing with 8 additions and 1 deletion.
  1. +7 −0 src/noise.h
  2. +1 −1 src/threading/thread.cpp
@@ -29,6 +29,13 @@
#include "exceptions.h"
#include "util/string.h"

#if defined(RANDOM_MIN)
#undef RANDOM_MIN
#endif
#if defined(RANDOM_MAX)
#undef RANDOM_MAX
#endif

extern FlagDesc flagdesc_noiseparams[];

// Note: this class is not polymorphic so that its high level of
@@ -219,7 +219,7 @@ void Thread::setName(const std::string &name)

#elif defined(__NetBSD__)

pthread_setname_np(pthread_self(), name.c_str());
pthread_setname_np(pthread_self(), "%s", const_cast<char*>(name.c_str()));

#elif defined(__APPLE__)

0 comments on commit b262184

Please sign in to comment.
You can’t perform that action at this time.