mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
cmdmon: define 64-bit integer
Add a structure for 64-bit integers without requiring 64-bit alignment to be usable in CMD_Reply without struct packing. Add utility functions for conversion to/from network order. Avoid using be64toh() and htobe64() as they don't seem to be available on all supported systems.
This commit is contained in:
3
util.h
3
util.h
@@ -172,6 +172,9 @@ extern double UTI_Log2ToDouble(int l);
|
||||
extern void UTI_TimespecNetworkToHost(const Timespec *src, struct timespec *dest);
|
||||
extern void UTI_TimespecHostToNetwork(const struct timespec *src, Timespec *dest);
|
||||
|
||||
uint64_t UTI_Integer64NetworkToHost(Integer64 i);
|
||||
Integer64 UTI_Integer64HostToNetwork(uint64_t i);
|
||||
|
||||
extern double UTI_FloatNetworkToHost(Float x);
|
||||
extern Float UTI_FloatHostToNetwork(double x);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user