adjtime could be more const
Our definition for
adjtime does not specify the first argument as const:
int adjtime(struct timeval *delta, struct timeval *olddelta);
This is at odds with most other UNIX-y platforms such as Linux, FreeBSD, NetBSD, etc, which declare the
delta argument as const.
I noticed this discrepancy when the rust libc tests began emitting errors on illumos since their declared FFI symbol for adjtime was recently updated to feature a const
It seems relatively safe to update ours to match.
Updated by Patrick Mooney about 1 year ago
On a machine running these bits, I repeated an illumos build to ensure that the change in
adjtime() prototype in
/usr/include did not somehow have adverse effects on the build. The full build completed with no issues.
With the patch installed, the portion of the rust-libc test suite relating to
adjtime now passes, since its prototype matches those in other OSes (and rust-libc assumes a common signature for all UNIX-y operating systems).
Updated by Electric Monk about 1 year ago
- Status changed from Pending RTI to Closed
- % Done changed from 90 to 100
commit b93865c3d90e9b0d73e338c9abb3293c35c571a8 Author: Patrick Mooney <email@example.com> Date: 2022-10-03T17:05:12.000Z 14985 adjtime could be more const Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>