kohler / click

The Click modular router: fast modular packet processing and analysis
Other
735 stars 322 forks source link

FromDevice/RawSocket: fix linux headers for 5.2 #451

Closed tyler569 closed 4 years ago

tyler569 commented 4 years ago

In kernel 5.2, the linux kernel team moved the definition of various constants around between headers, which breaks building click usermode on linux kernels >= 5.2.

Specifically, the constant SIOCGSTAMP was moved to <linux/sockios.h> when they updated the ioctl to work with 64-bit struct timeval.

This commit adds the <linux/sockios.h> header in the places where this constant is used (FromDevce and RawSocket), gated to only apply to linux builds.

I have tested this to compile on kernel 4.19 and 5.3.

tbarbette commented 4 years ago

I guess this is safe to merge, and multiple users hit this so...