[CDRIVER-2423] Undefined BSON_HAS_RAND_R in libbson Created: 12/Dec/17  Updated: 28/Oct/23  Resolved: 12/Dec/17

Status: Closed
Project: C Driver
Component/s: libbson
Affects Version/s: 1.9.0
Fix Version/s: 1.9.0

Type: Bug Priority: Minor - P4
Reporter: Jeroen Ooms [X] Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I noticed that bson-context.c has

{#ifndef BSON_HAS_RAND_R}

however this macro is never defined so it is always true, making the subsequent

{#elif}

and

{#else}

redundant?



 Comments   
Comment by A. Jesse Jiryu Davis [ 12/Dec/17 ]

It should've been BSON_HAVE_RAND_R, thanks for the report. This is a new bug in unreleased code. Fixed in master and the r1.9 branch.

Comment by Githook User [ 12/Dec/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CDRIVER-2423 fix config check for rand_r
Branch: master
https://github.com/mongodb/libbson/commit/4ac1bdfc96f928a5d36b39ed3d3d3698a648e8c4

Generated at Wed Feb 07 21:15:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.