ip_frag: add IPv4 options fragment
[dpdk.git] / lib / eal / common / eal_common_string_fns.c
index 60c5dd6..0236ae4 100644 (file)
@@ -2,12 +2,11 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
-#include <string.h>
 #include <stdio.h>
-#include <stdarg.h>
 #include <errno.h>
 
 #include <rte_string_fns.h>
+#include <rte_errno.h>
 
 /* split string into tokens */
 int
@@ -62,5 +61,6 @@ rte_strscpy(char *dst, const char *src, size_t dsize)
        /* Not enough room in dst, set NUL and return error. */
        if (res != 0)
                dst[res - 1] = '\0';
-       return -E2BIG;
+       rte_errno = E2BIG;
+       return -rte_errno;
 }