-
Notifications
You must be signed in to change notification settings - Fork 7.9k
stream: Fix MacOS build. fsync as alias for fdatasync. #6882
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
Conversation
I'm confused about why this works in CI (using macos 10.15). Was this function recently added/removed? |
I spotted it because of |
That just leaves me more confused. We build with |
There is a syscall id mentioning it but not wrapper function, no man page entry for it. |
Does it imply |
I just double checked this, and this the the used compilation command:
It includes -Wall -Wextra -Werror, so should definitely catch implicit function declarations. My best guess is that we're pulling in a header somewhere that has an fdatasync compatibility define... |
Then yes it is the only reason it could happen I locally does not use so many dependencies. |
0e638d9
to
b90bdbe
Compare
I've dumped the preprocessed code (-E) for the file: https://dev.azure.com/phpazuredevops/eb1f6f74-bc61-47a6-a414-0e3ff41c9bb4/_apis/build/builds/16109/logs/28 fdatasync() is being called directly and there is no declaration for it, so it's not the case that it was defined by some other header. But for some reason the build does not fail. I even added an explicit |
I have a slighty better idea what is happening now. I did a quick sample local code and if I compile with clang from Xcode then it is fine fdatasync symbol is picked up rightfully (but fdatasync not present in the headers tough), however with gcc/clang compilers from homebrew then I get the warning. Maybe the best course of action would be configure time detection then what do you think ? |
Any idea where Xcode is getting the symbol from?
Yes, I think this would make the most sense. After all, macos may also not be the only system without this function. We can add it to the list in Line 545 in d24cf1a
|
b90bdbe
to
dcb05eb
Compare
No idea, it seems part of Apple's secret sauce :) |
I have no idea why. My guess... don't use it? |
I'm still seeing |
No description provided.