build/linux: rename macro from LINUXAPP to LINUX
[dpdk.git] / examples / ip_pipeline / tap.c
index a0f6086..ea979bd 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 #include <netinet/in.h>
-#ifdef RTE_EXEC_ENV_LINUXAPP
+#ifdef RTE_EXEC_ENV_LINUX
 #include <linux/if.h>
 #include <linux/if_tun.h>
 #endif
@@ -15,6 +15,8 @@
 #include <string.h>
 #include <unistd.h>
 
+#include <rte_string_fns.h>
+
 #include "tap.h"
 
 #define TAP_DEV                                            "/dev/net/tun"
@@ -44,7 +46,7 @@ tap_find(const char *name)
        return NULL;
 }
 
-#ifndef RTE_EXEC_ENV_LINUXAPP
+#ifndef RTE_EXEC_ENV_LINUX
 
 struct tap *
 tap_create(const char *name __rte_unused)
@@ -88,7 +90,7 @@ tap_create(const char *name)
                return NULL;
        }
        /* Node fill in */
-       strncpy(tap->name, name, sizeof(tap->name));
+       strlcpy(tap->name, name, sizeof(tap->name));
        tap->fd = fd;
 
        /* Node add to list */