Skip to content

Conversation

@barracuda156
Copy link

pthread_threadid_np does not exist before 10.6 and is not available in 10.6 for powerpc. Provide a fallback for it.

Comment on lines +1100 to +1104
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 || defined(__POWERPC__)
thread_id = pthread_mach_thread_np(pthread_self());
#else
pthread_threadid_np(pthread_self(), &thread_id);
#endif
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite the right check. MAC_OS_X_VERSION_MAX_ALLOWED checks the SDK being built against. Better to check MAC_OS_X_VERSION_MIN_REQUIRED which is the deployment version. You could build against the 10.5 SDK but deploy back to 10.4 for example.

I suggest:

#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
  new_fn();
#else
  old_fun();
#endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants