Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GNU/Hurd build #709

Merged
merged 3 commits into from
May 9, 2024
Merged

Fix GNU/Hurd build #709

merged 3 commits into from
May 9, 2024

Conversation

sthibaul
Copy link
Contributor

No description provided.

Like on other platforms, GNU/Hurd needs _POSIX_C_SOURCE to be defined to
get access to get strerror_r declared, otherwise we get:

src/internal_modules/roc_core/target_posix/roc_core/errno_to_str.cpp: In member function 'void roc::core::errno_to_str::format_(int)':
src/internal_modules/roc_core/target_posix/roc_core/errno_to_str.cpp:30:9: error: 'strerror_r' was not declared in this scope; did you mean 'strerror'?
   30 |     if (strerror_r(err, buffer_, sizeof(buffer_)) != 0) {
      |         ^~~~~~~~~~
      |         strerror
They work exactly like on Linux since the toolchain is the same.
GNU/Hurd does not define any hardcoded PATH_MAX limitation, so roc_core
has to define its own for its dir_ and file_ statically-allocated
arrays.
Copy link

🤖 Upon creation, pull request description does not have a link to an issue. If there is a related issue, please add it to the description using any of the supported formats.

@gavv gavv added ready for review Pull request can be reviewed contribution A pull-request by someone else except maintainers labels Apr 9, 2024
@gavv gavv merged commit b1d368e into roc-streaming:develop May 9, 2024
30 of 33 checks passed
@github-actions github-actions bot removed the ready for review Pull request can be reviewed label May 9, 2024
@gavv
Copy link
Member

gavv commented May 9, 2024

Thanks! It's always cool to see support for more platforms.

I've pushed two follow-up commits:

  • bab2d0d - cleanup handling of GNU(-compatible) toolchains
  • 1e3ecdf - remove PATH_MAX (I don't want to pollute header and it's not really needed)

Please let me know if my update still works on Hurd, since I don't have one to test.

@gavv gavv added this to the next milestone May 9, 2024
@sthibaul sthibaul deleted the hurd branch May 9, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution A pull-request by someone else except maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants