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

Add unistd.h to libzip to prevent build failure with Xcode 14.3 #2060

Closed

Conversation

shinra-electric
Copy link

@shinra-electric shinra-electric commented Apr 13, 2023

What does this PR do?

Without this PR, Premake will fail to build using Xcode 14.3. This PR adds unistd.h to three files in libzip which will allow the build to succeed.

How does this PR change Premake's behavior?
Allows the build to succeed.

Are there any breaking changes? Will any existing behavior change?
Not that I'm aware of.

Anything else we should know?

From my understanding, unistd.h is for posix-compliant OSes, so ideally I should ifdef these changes so they are not added to non-posix OSes.

zip_close.c has the check #ifdef HAVE_UNISTD_H which I thought would be appropriate, but building still fails when using this.

If anyone can suggest a better define, let me know and I'll add it.

Prevents build failure on Xcode 14.3
Prevents build failure with Xcode 14.3
Prevents build failure with Xcode 14.3
@shinra-electric shinra-electric changed the title [macOS] Add unistd.h to libzip to prevent build failure with Xcode 14.3 Add unistd.h to libzip to prevent build failure with Xcode 14.3 Apr 13, 2023
@Jarod42
Copy link
Contributor

Jarod42 commented Apr 13, 2023

Isn't contrib 3rd party? so existing repo? shouldn't we upgrade to more up-to-date and propose fix to there repo?

@shinra-electric
Copy link
Author

Well yes, but it is part of this repo. That usually means that there are changes from upstream.

If we are just using stock libzip shouldn't we have it as a submodule or something?

@shinra-electric
Copy link
Author

Closing, as PR #2117 does the same thing and has already been merged.

@shinra-electric shinra-electric deleted the macOS-header-fix branch August 16, 2023 19:10
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