Skip to content

Commit c3a202a

Browse files
committed
example: compatible with Apple
1 parent d09ed57 commit c3a202a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

examples/rtde_client.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ void printFraction(const double fraction, const std::string& label, const size_t
5959

6060
int main(int argc, char* argv[])
6161
{
62-
pthread_t thread = pthread_self();
6362

6463
#ifdef _WIN32
64+
pthread_t thread = pthread_self();
6565
pprocess_t process = pprocess_self();
6666

6767
// Assign logical CPUs 6 and 7 to this process
@@ -77,7 +77,8 @@ int main(int argc, char* argv[])
7777
{
7878
URCL_LOG_ERROR("Failed to set thread affinity");
7979
}
80-
#else
80+
#elif __linux__
81+
pthread_t thread = pthread_self();
8182
cpu_set_t cpuset;
8283
CPU_ZERO(&cpuset);
8384

0 commit comments

Comments
 (0)