Skip to content

Support building on RISC OS - #410

Merged
nmoinvaz merged 1 commit into
zlib-ng:devfrom
ccawley2011:riscos
Aug 7, 2019
Merged

nmoinvaz merged 1 commit into
zlib-ng:devfrom
ccawley2011:riscos

Conversation

@ccawley2011

Copy link
Copy Markdown
Contributor

No description provided.

@nmoinvaz

nmoinvaz commented Aug 6, 2019 •

Copy link
Copy Markdown
Member

Thanks for the PR! Why is it necessary for _GNU_SOURCE_? Is there a function that is not available?

@ccawley2011

Copy link
Copy Markdown
Contributor Author

Why is it necessary for GNU_SOURCE? Is there a function that is not available?

It's needed for lstat().

@nmoinvaz

nmoinvaz commented Aug 6, 2019

Copy link
Copy Markdown
Member

I'm surprised -D_POSIX_C_SOURCE=200112L doesn't solve it. Does _BSD_SOURCE work? The thing is I don't see _GNU_SOURCE in http://man7.org/linux/man-pages/man2/stat.2.html

@ccawley2011

Copy link
Copy Markdown
Contributor Author

It appears that the issue is that features.h on RISC OS defines __USE_XOPEN2K when _POSIX_C_SOURCE is greater than or equal to 200112L, but not __USE_XOPEN_EXTENDED, which is needed by lstat. I've submitted a patch for this here, and removed the addition of _GNU_SOURCE from this PR, since using lstat when __USE_XOPEN_EXTENDED is not set will just result in a warning.

@nmoinvaz

nmoinvaz commented Aug 7, 2019 •

Copy link
Copy Markdown
Member

Sounds great. Thanks for your PR!

@nmoinvaz
nmoinvaz merged commit 1e1227b into zlib-ng:dev Aug 7, 2019
@ccawley2011
ccawley2011 deleted the riscos branch August 7, 2019 17:31
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