Bug 2168

Summary: Fails to build after arc4random API change in OpenBSD
Product: Portable OpenSSH Reporter: Jeremie Courreges-Anglas <jca>
Component: Build systemAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: minor CC: dtucker, jca
Priority: P5    
Version: -current   
Hardware: All   
OS: OpenBSD   
Bug Depends on:    
Bug Blocks: 2130    
Attachments:
Description Flags
Detect arc4random_stir() availability none

Description Jeremie Courreges-Anglas 2013-11-06 23:56:52 AEDT
Created attachment 2372 [details]
Detect arc4random_stir() availability

Since http://marc.info/?l=openbsd-cvs&m=138238762705209&w=2 OpenSSH-portable fails to build on OpenBSD-current (post 5.4). This is a problem for the OpenBSD ports tree which includes copies of the openssh-portable source code.

Since other OSes have not implemented yet the improvements made since 10 years to the arc4random API, calling the arc4random_addrandom() or arc4random_stir() functions is still necessary on those platforms. Maybe one day we'll finally get rid of those functions.

The patch attached fixes build on OpenBSD-current and any other platform willing to remove these functions.
Comment 1 Darren Tucker 2013-11-08 22:29:33 AEDT
I noticed that too on my test system.  Fixed in a similar way, it will be in 6.5p1.

Thanks.
Comment 2 Jeremie Courreges-Anglas 2013-11-13 00:11:41 AEDT
(In reply to Darren Tucker from comment #1)
> I noticed that too on my test system.  Fixed in a similar way, it
> will be in 6.5p1.
> 
> Thanks.

Great.  I should have added that (void(0)) was inspired by the
definition for assert() when NDEBUG is defined, as per the C standards.
Comment 3 Damien Miller 2015-08-11 23:05:42 AEST
Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1