]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
Fixed errors when compiled with GCC 4.3.2
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 29 Oct 2008 10:42:14 +0000 (11:42 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 29 Oct 2008 10:42:14 +0000 (11:42 +0100)
src/cand/eb2008/cand_eb2008.cc
src/canlog/canlog.cc

index df0d6f0ac8fed7014cfab3c8d3696ccad92adbd3..62997c7a6a62bc5ae758a59d41a4a9db28d08070 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 #endif
 
+#include <cstring>
 #include <iostream>
 #include <cstdlib>
 #include <sys/socket.h>
@@ -39,7 +40,7 @@ int cand_init()
        }
 
        can_addr.can_family = AF_CAN;
-       strcpy(can_ifreq.ifr_name, "can0");
+       std::strcpy(can_ifreq.ifr_name, "can0");
 
        if (ioctl(sock, SIOCGIFINDEX, &can_ifreq) < 0) {
                perror("cand: SIOCGIFINDEX");
index 457690906a8126420485db3f17cb6915dacec407..0cd09ec904b3d1a42be7486fb806c9aa6ff6a847 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 #endif
 
+#include <cstring>
 #include <iostream>
 #include <cstdlib>
 #include <sys/socket.h>
@@ -35,7 +36,7 @@ int cand_init()
        }
 
        can_addr.can_family = AF_CAN;
-       strcpy(can_ifreq.ifr_name, "can1");
+       std::strcpy(can_ifreq.ifr_name, "can1");
 
        if (ioctl(sock, SIOCGIFINDEX, &can_ifreq) < 0) {
                perror("cand: SIOCGIFINDEX");