Ticket #42000

OSX randseed.c compilation failing

Open Date: 2021-04-14 19:33 Last Update: 2021-04-14 20:25

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

Seen on CI, OSX build fails:

--

../../utility/randseed.c:60:7: error: implicit declaration of function 'getentropy' is invalid in C99 -Werror,-Wimplicit-function-declaration

if (getentropy(&seed, sizeof(seed)) == 0) {

--

Configure check for both sys/random.h header and getentropy() existence success. The likely cause of the failure is that AC_CHECK_HEADER() does not, unlike AC_CHECK_HEADERS(), define the HAVE_xxx macro by itself.

Ticket History (3/5 Histories)

2021-04-14 19:33 Updated by: cazfi
  • New Ticket "OSX randseed.c compilation failing" created
2021-04-14 19:56 Updated by: cazfi
Comment

Check for bcrypt.h has been similarly changed from being part of AC_CHECK_HEADERS() to AC_CHECK_HEADER() and macro HAVE_BCRYPT_H is expected in randseed.c.

2021-04-14 20:08 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
Comment

- Will push attached patch to master immediately. If CI then indicates that it fixes the OSX issue, will push also to other branches.

2021-04-14 20:25 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed
Comment

Now pushed to all branches.

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login