-
Notifications
You must be signed in to change notification settings - Fork 24
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
Compilation error with GCC #33
Comments
A brief search shows me this is at least correct for Linux. Need to confirm this is correct for illumos and bsd system types. |
Please go ahead @josephholsten 😉... |
With the help of Zahra Sharbaf, we recently discovered that simply replacing |
There was a mistake in my previous message: on macOS, the format is case $on_mac_os in
yes) sed -e's/\%1u/\%d/' src/flock.c > src/flock-new.c;;
no) sed -e's/\%1u/\%ld/' src/flock.c > src/flock-new.c;;
*) echo "pre-make-build.sh: '$on_mac_os' unrecognized value for on_mac_os";;
esac It would be great if this can be taken into the source of flock for future versions so we can remove this extra manual correction 😉. |
Well, I don’t love putting this into the build script, but fixed in an ugly way is better than broken! I’m sorry I’m not really able to draft this in the near future. I’m giving you a commit bit, please push us a PR! |
This never got fixed, apparently. The proper fix, in my opinion, is to cast the result to either |
When building flock 0.4.0 with GCC 11.1.0, I get the following compilation error:
As the compiler recommends, it can be fixed by simply replacing
%1u
with%1lu
. After making this change Flock was successfully built on my system.The text was updated successfully, but these errors were encountered: