Project:Toolchain/Linux headers 5.2 porting notes/SIOCGSTAMP
From Gentoo Wiki
Jump to:navigation
Jump to:search
The problem
linux-headers-5.2 updated SIOCGSTAMP ioctl to work against 32-bit and 64-bit struct timeval. Commit: https://github.com/torvalds/linux/commit/0768e17073dc527ccd18ed5f96ce85f9985e9115
This shuffled headers a bit and caused build breakage for linux-specific software:
dhcp.c:182:17: error: SIOCGSTAMP was not declared in this scope
The fix
Normally you just need to include the header that now contains SIOCGSTAMP definition:
#include <linux/sockios.h>
Links
- upstream discussion: https://lkml.org/lkml/2019/7/20/108
- example fix: https://bugs.gentoo.org/690788