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:

CODE
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:

CODE
#include <linux/sockios.h>

Links