johalun / sysctl-rs

A simplified Rust interface to the sysctl system call
MIT License
51 stars 23 forks source link

S64 is a signed integer. #27

Closed mordak closed 4 years ago

mordak commented 4 years ago

CTLTYPE_S64 is a signed integer, but the value declaration makes it unsigned.

Relevant FreeBSD src: https://github.com/freebsd/freebsd/blob/master/sys/sys/sysctl.h#L73

Tested on FreeBSD 12, but I think I found all the S64 instances in the other supported platforms. The size calculation in min_type_size() already used i64.

johalun commented 4 years ago

Doh.. Thanks again!

fabianfreyer commented 4 years ago

Oops!