Skip to content

Commit

Permalink
NetBSD build fix proposal. (#10308)
Browse files Browse the repository at this point in the history
Fixing thread naming call and let the class setting RANDOM_MIN/RANDOM_MAX.
  • Loading branch information
devnexen authored Aug 25, 2020
1 parent 44c9808 commit b262184
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/noise.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/threading/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down

0 comments on commit b262184

Please sign in to comment.