Group :: System/Libraries
RPM: dpdk
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: dpdk-19.11.3-fix-redefinition.patch
Download
Download
diff -ur dpdk-19.11.3/lib/librte_eal/common/include/rte_string_fns.h dpdk-19.11.3.new/lib/librte_eal/common/include/rte_string_fns.h
--- dpdk-19.11.3/lib/librte_eal/common/include/rte_string_fns.h 2020-08-13 04:46:25.000000000 +0300
+++ dpdk-19.11.3.new/lib/librte_eal/common/include/rte_string_fns.h 2020-08-13 04:47:52.677689329 +0300
@@ -51,49 +51,6 @@
char **tokens, int maxtokens, char delim);
/**
- * @internal
- * DPDK-specific version of strlcpy for systems without
- * libc or libbsd copies of the function
- */
-static inline size_t
-rte_strlcpy(char *dst, const char *src, size_t size)
-{
- return (size_t)snprintf(dst, size, "%s", src);
-}
-
-/**
- * @internal
- * DPDK-specific version of strlcat for systems without
- * libc or libbsd copies of the function
- */
-static inline size_t
-rte_strlcat(char *dst, const char *src, size_t size)
-{
- size_t l = strnlen(dst, size);
- if (l < size)
- return l + rte_strlcpy(&dst[l], src, size - l);
- return l + strlen(src);
-}
-
-/* pull in a strlcpy function */
-#ifdef RTE_EXEC_ENV_FREEBSD
-#ifndef __BSD_VISIBLE /* non-standard functions are hidden */
-#define strlcpy(dst, src, size) rte_strlcpy(dst, src, size)
-#define strlcat(dst, src, size) rte_strlcat(dst, src, size)
-#endif
-
-#else /* non-BSD platforms */
-#ifdef RTE_USE_LIBBSD
-#include <bsd/string.h>
-
-#else /* no BSD header files, create own */
-#define strlcpy(dst, src, size) rte_strlcpy(dst, src, size)
-#define strlcat(dst, src, size) rte_strlcat(dst, src, size)
-
-#endif /* RTE_USE_LIBBSD */
-#endif /* FREEBSD */
-
-/**
* Copy string src to buffer dst of size dsize.
* At most dsize-1 chars will be copied.
* Always NUL-terminates, unless (dsize == 0).
diff -ur dpdk-19.11.3/lib/librte_fib/rte_fib6.c dpdk-19.11.3.new/lib/librte_fib/rte_fib6.c
--- dpdk-19.11.3/lib/librte_fib/rte_fib6.c 2020-08-13 04:46:25.000000000 +0300
+++ dpdk-19.11.3.new/lib/librte_fib/rte_fib6.c 2020-08-13 04:47:08.004721538 +0300
@@ -210,7 +210,7 @@
goto free_te;
}
- rte_strlcpy(fib->name, name, sizeof(fib->name));
+ strlcpy(fib->name, name, sizeof(fib->name));
fib->rib = rib;
fib->type = conf->type;
fib->def_nh = conf->default_nh;
diff -ur dpdk-19.11.3/lib/librte_fib/rte_fib.c dpdk-19.11.3.new/lib/librte_fib/rte_fib.c
--- dpdk-19.11.3/lib/librte_fib/rte_fib.c 2020-08-13 04:46:25.000000000 +0300
+++ dpdk-19.11.3.new/lib/librte_fib/rte_fib.c 2020-08-13 04:47:02.802725290 +0300
@@ -208,7 +208,7 @@
goto free_te;
}
- rte_strlcpy(fib->name, name, sizeof(fib->name));
+ strlcpy(fib->name, name, sizeof(fib->name));
fib->rib = rib;
fib->type = conf->type;
fib->def_nh = conf->default_nh;
diff -ur dpdk-19.11.3/lib/librte_rib/rte_rib6.c dpdk-19.11.3.new/lib/librte_rib/rte_rib6.c
--- dpdk-19.11.3/lib/librte_rib/rte_rib6.c 2020-08-13 04:46:25.000000000 +0300
+++ dpdk-19.11.3.new/lib/librte_rib/rte_rib6.c 2020-08-13 04:46:57.473729137 +0300
@@ -510,7 +510,7 @@
goto free_te;
}
- rte_strlcpy(rib->name, name, sizeof(rib->name));
+ strlcpy(rib->name, name, sizeof(rib->name));
rib->tree = NULL;
rib->max_nodes = conf->max_nodes;
rib->node_pool = node_pool;
diff -ur dpdk-19.11.3/lib/librte_rib/rte_rib.c dpdk-19.11.3.new/lib/librte_rib/rte_rib.c
--- dpdk-19.11.3/lib/librte_rib/rte_rib.c 2020-08-13 04:46:25.000000000 +0300
+++ dpdk-19.11.3.new/lib/librte_rib/rte_rib.c 2020-08-13 04:46:51.915733143 +0300
@@ -453,7 +453,7 @@
goto free_te;
}
- rte_strlcpy(rib->name, name, sizeof(rib->name));
+ strlcpy(rib->name, name, sizeof(rib->name));
rib->tree = NULL;
rib->max_nodes = conf->max_nodes;
rib->node_pool = node_pool;