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

Unbreak build on non-GNU by adding missing include #61

Merged
merged 1 commit into from
Nov 13, 2022
Merged

Unbreak build on non-GNU by adding missing include #61

merged 1 commit into from
Nov 13, 2022

Conversation

jbeich
Copy link
Contributor

@jbeich jbeich commented Nov 12, 2022

Injecting #error into <sys/stat.h> on a non-affected system may give a clue where it's implicitly included.

src/lock.c:56:46: error: use of undeclared identifier 'S_IRUSR'
        int fd = open(filename, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR);
                                                    ^
src/lock.c:56:56: error: use of undeclared identifier 'S_IWUSR'
        int fd = open(filename, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR);
                                                              ^
@jbeich jbeich changed the title Unbreak build on FreeBSD by adding missing include Unbreak build on non-GNU by adding missing include Nov 13, 2022
@philj56 philj56 merged commit 25c0035 into philj56:master Nov 13, 2022
@philj56
Copy link
Owner

philj56 commented Nov 13, 2022

Thanks! Looks like it's fcntl.h that's different - in both glibc and musl, the S_* macros are defined directly in fcntl.h, as well as sys/stat.h.

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.

None yet

2 participants