-
Notifications
You must be signed in to change notification settings - Fork 350
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
Fix issues with mismatched rlimit types on FreeBSD #253
Conversation
FreeBSD uses int64 for rlimit, the code here currently assumes uint64. This creates a file for FreeBSD builds so that unint64 & int64 are converted back & forth so there is no mismatch.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I have applied for the CLA. Waiting for it to take effect. |
CLAs look good, thanks! |
@@ -0,0 +1,81 @@ | |||
// Copyright 2015 Google Inc. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The license for a new file should be updated to 2019 Google LLC
.
I just ran into this yesterday and would love to see this merged. The proposed change resolves the issue on my machine. |
LGTM. Copyright notice is not a blocker. |
On FreeBSD, the type for rlimit.max & rlimit.cur are int64. Currently cloudsql-proxy expects them to be uint64. This pull request casts the type of rlimit.cur & rlimit max to uint64, & casts the value of the passed in
wantFDs
to int64 when trying to assign it to rlim.Cur & rlim.Max.See perkeep/perkeep#925 & https://camlistore-review.googlesource.com/c/camlistore/+/10147/ for other projects where this has reared its head.