The sysctl(2) prototype in OpenBSD sysctl.d is subtly incorrect: the fifth parameter is marked const in sysctl.d but it is not actually const in OpenBSD. It may not matter so much in practice, but why not get it correct?
See here for the OpenBSD prototype: https://github.com/openbsd/src/blob/master/sys/sys/sysctl.h#L1084
The mismatch may be because OpenBSD sysctl.d derives from FreeBSD sysctl.d -- on FreeBSD, the fifth parameter is marked const.
While here, removed the parameter names; nothing else in this directory uses named parameters in their prototypes.
dlang/druntime pull request #3597 "Fix Issue 22440 - OpenBSD: Sync sysctl.d" was merged into stable:
- 6465aaed6371e9fd4d6bd8c8ea1a1e10faac182f by Brian Callahan:
Fix Issue 22440 - OpenBSD: Sync sysctl.d
https://github.com/dlang/druntime/pull/3597
Comment #3 by dlang-bot — 2021-11-08T15:54:17Z
dlang/druntime pull request #3615 "Merge `stable` in `mater`" was merged into master:
- 5ff9151dc61143f321bdd4e17118f4ce14e90d6b by Brian Callahan:
Fix Issue 22440 - OpenBSD: Sync sysctl.d
https://github.com/dlang/druntime/pull/3615