[CMake] using arm toolchain and having issues with linux socket can

Gunter, Walter E Walter.Gunter at dematic.com
Sun Sep 18 10:57:54 EDT 2016


Okay...made the change, but am still getting the error.
Here is the top level of mycan.cpp


#include <stdio.h>
#include <pthread.h>
#include <net/if.h>
#include <string.h>
#include <unistd.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <assert.h>
#include <linux/can.h>
#include <linux/can/raw.h>



-----Original Message-----
From: Rolf Eike Beer [mailto:eike at sf-mail.de] 
Sent: Saturday, September 17, 2016 1:19 AM
To: Gunter, Walter E
Cc: cmake at cmake.org
Subject: Re: [CMake] using arm toolchain and having issues with linux socket can

Am Freitag, 16. September 2016, 22:54:25 schrieb Gunter, Walter E:
> Ah..got ya. 
> There are two in my toolchain:
> Sys/socket.h
> Linux/socket.h
> 
> I couldn't find AF_CAN or PF_CAN defined in the sys one, but it is in 
> the linux.
 I included it, but still getting the error when building that it
> can't find it. 

I already told you it's sys/socket.h. In fact it's bits/socket.h, but the
bits/* stuff should never be included directly. But it is included in sys/socket.h, so just use this.

Eike


More information about the CMake mailing list