Skip to content

Fix internal error on macOS by replacing gettid with pthread_threadid_np#110

Open
final-venture wants to merge 2 commits intoCOMP1511UNSW:masterfrom
final-venture:fix/macos-gettid-error
Open

Fix internal error on macOS by replacing gettid with pthread_threadid_np#110
final-venture wants to merge 2 commits intoCOMP1511UNSW:masterfrom
final-venture:fix/macos-gettid-error

Conversation

@final-venture
Copy link

Summary

This PR fixes a build failure on macOS caused by a call to "gettid()", which is a Linux-specific system call.

Changes

  • Added a preprocessor check for "APPLE".
  • Implemented a helper function "gettid()" for macOS using the macOS native "pthread_threadid_np()".

Related Issue

Fixes #106

Verification

Verified that dcc compiles and runs on macOS without the "undeclared function" error.

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.

Function 'gettid' does not exist on MacOS, dcc use in Mac terminal results in "dcc: Internal error"

1 participant