You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a new module for `utmpx` and move definitions there, then correct
`_UTX_PADSIZE`. We can also just use `s!`, there is no need to manually
implement the traits.
NetBSD defines `_UTX_PADSIZE` manually but includes this comment in
their source:
/*
* This should be:
* 40 - (sizeof(struct timeval) - sizeof(struct { long s; long u; })))
* but g++ does not like it, to retain size compatibility with v1.00,
* so we do it manually.
*/
#ifdef _LP64
#define _UTX_PADSIZE 36
#else
#define _UTX_PADSIZE 40
#endif
I tried using the expression here:
40 - (size_of::<crate::timeval>() - size_of::<(c_long, c_long)>());
But this returns a value of 8 which doesn't match the expected 36. So,
keep with their source and hardcode the values.
Link: https://github.com/NetBSD/src/blob/6ace5fed3bd010695a1b88ca6c1f8a5af7793ffb/include/utmpx.h#L91-L101
(backport <#4782>)
(cherry picked from commit 4055637)
0 commit comments