Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: ‘SIOCGSTAMPNS’ was not declared in this scope #21

Open
brooc opened this issue Sep 23, 2022 · 3 comments
Open

error: ‘SIOCGSTAMPNS’ was not declared in this scope #21

brooc opened this issue Sep 23, 2022 · 3 comments

Comments

@brooc
Copy link

brooc commented Sep 23, 2022

I'm getting the following error when building on Ubuntu 20.04:

driver/SocketCanDriver/SocketCanInterface.cpp:428:28: error: ‘SIOCGSTAMPNS’ was not declared in this scope; did you mean ‘SIOCGSTAMP_OLD’?
  428 |             if (ioctl(_fd, SIOCGSTAMPNS, &ts_rcv) == 0) {
      |                            ^~~~~~~~~~~~
      |                            SIOCGSTAMP_OLD

The fix from here is to include
#include <linux/sockios.h> in src/driver/SocketCanDriver/SocketCanInterface.cpp

@uanheng
Copy link

uanheng commented Jan 10, 2023

add the file "#include <linux/sockios.h>" to driver/SocketCanDriver/SocketCanInterface.cpp

@brooc
Copy link
Author

brooc commented Jan 10, 2023

Isn't that what I wrote?

@ingjae
Copy link

ingjae commented Aug 23, 2023

it works for me thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants