Bug 2168 - Fails to build after arc4random API change in OpenBSD
Summary: Fails to build after arc4random API change in OpenBSD
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: -current
Hardware: All OpenBSD
: P5 minor
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_6_5
  Show dependency treegraph
 
Reported: 2013-11-06 23:56 AEDT by Jeremie Courreges-Anglas
Modified: 2015-08-11 23:05 AEST (History)
2 users (show)

See Also:


Attachments
Detect arc4random_stir() availability (1.35 KB, patch)
2013-11-06 23:56 AEDT, Jeremie Courreges-Anglas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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