Fix compiler warnings and update README.OSX#501
Merged
wolfcw merged 2 commits intowolfcw:masterfrom Jun 9, 2025
Merged
Conversation
To give more context, stat64 is a child of large-file support (LFS) back in 1996, during the transition from 32-bit to 64-bit. People wanted 64-bit inodes in 32-bit systems, hence stat and stat64. Nowadays where everything is 64-bit, stat64 is mostly just an alias to stat, as stat is already native 64-bit. On modern implementations like musl, stat64 is even dropped entirely as a sane default. We observe the same in darwin's stat.h: #if !__DARWIN_ONLY_64_BIT_INO_T struct stat64 __DARWIN_STRUCT_STAT64; #endif /* !__DARWIN_ONLY_64_BIT_INO_T */ Because struct stat64 doesn't ever exist on aarch64-darwin, and we don't have to worry about people using stat64 calls, we can safely remove all stat64 bloat, according to __DARWIN_ONLY_64_BIT_INO_T. I nuked fake_stat64buf because only STAT64_HANDLER is using it, and only non-darwin stat64 things use that handler. I didn't do more because people might still use stat64 things on x86_64 (on glibc) and other older 32-bit platforms, and we still need to hook those. A loose follow up to PR wolfcw#453. Fixes the remaining clang warnings on aarch64-darwin.
Contributor
Author
|
@wolfcw Do you want to do a version bump on this? |
Owner
|
the recent changes break building on Linux, so I need to fix that first :) |
Contributor
Author
|
Ahhh I see, that's worrying D: I will look into it 👀 |
Contributor
Author
|
OK I think I did it wrong, I can open another PR. |
usertam
added a commit
to usertam/libfaketime
that referenced
this pull request
Jun 9, 2025
I got the logic wrong in PR wolfcw#501 in the inner `#ifndef __APPLE__`. This broke building on linux. This should fix it.
Owner
|
Looks good with #502, version bumped :) |
Contributor
Author
|
Thanks for the help! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some finishing touches following #500 and #497.
Fix the compiler warnings about stat64 things; please review the commit message. I wish there could be a clear-cut solution to
stat64, but I don't think there is one without sacrificing backwards compatibility.Update README.OSX about the new
arm64eABI.Can we do a version bump after this, if there are no problems with it?
I hate having the latest release broken on darwin. Thanks :D