Use the private method instead of direct C syscall.
[apps/agl-service-can-low-level.git] / CAN-binder / low-can-binding / utils / socketcan.cpp
index 53631e9..0f2e01f 100644 (file)
@@ -22,7 +22,6 @@
 #include <sys/ioctl.h>
 
 #include "socketcan.hpp"
-#include "can-message.hpp"
 
 namespace utils
 {
@@ -114,7 +113,7 @@ namespace utils
                close();
                
                struct ifreq ifr;
-               socket_ = ::socket(PF_CAN, SOCK_DGRAM, CAN_BCM);
+               socket_ = open(PF_CAN, SOCK_DGRAM, CAN_BCM);
 
                // Attempts to open a socket to CAN bus
                ::strcpy(ifr.ifr_name, device_name.c_str());