-
Notifications
You must be signed in to change notification settings - Fork 455
CDRIVER-4234 Detect arc4random_buf using cmake #911
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
Detect the availability of arc4random_buf when running cmake rather than using a hardcoded list of platforms on which it is available. Fixes build failure on Mac OS X 10.6 where it is not available.
Make arc4random_buf the first choice to use if it is available. Previously, if rand_r was not available, the older rand would be used even if arc4random_buf was available.
887b98f
to
42dbf00
Compare
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.
LGTM, thank you for the contribution @ryandesign!
This issue also happen in macOS 11 |
@muzuiget Which issue are you referring to? The code should have already built fine on Mac OS X 10.7 and later, including macOS 11 and 12; it did for me. This PR was specifically to fix Mac OS X 10.6 and earlier which don't have |
@ryandesign I built v1.20.0 fail on macOS 11, it report a |
It may, but |
I built it on Azure Pipelines macOS-11 image, it was success in The build script:
The build log:
Or maybe Azure Pipelines has update the macOS-11 image, but I don't know what cause this error. |
Here is more details the
|
@muzuiget / @ryandesign, the error on macOS 11 may be caused by CDRIVER-4233. There is a proposed fix in #910. |
Ohh right, I forgot about that already. |
Detect the availability of
arc4random_buf
when running cmake rather than using a hardcoded list of platforms on which it is available. Fixes build failure on Mac OS X 10.6 where it is not available.Also now make
arc4random_buf
the first choice to use if it is available. Previously, ifrand_r
was not available, the olderrand
would be used even ifarc4random_buf
was available.