Fix windows

This commit is contained in:
Kilian Hofmann 2022-01-03 05:16:47 +01:00
parent 4b893ca726
commit 0a4e95cd30
2 changed files with 7 additions and 7 deletions

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@ -26,16 +26,16 @@
#if defined APL || defined LIN
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <unistd.h>
#endif
#include <cmath>
#include <functional>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include <sstream>
namespace util
{
@ -275,9 +275,7 @@ namespace util
return 0;
}
#pragma clang diagnostic pop
#endif
static inline void setThreadName(const std::string &name)
{
#ifdef APL
@ -295,9 +293,6 @@ namespace util
// http://man7.org/linux/man-pages/man2/prctl.2.html
//
pthread_setname_np(pthread_self(), name.substr(0, 15).c_str());
#endif
#ifdef IBM
SetThreadName(-1, name.c_str());
#endif
}