From: Thomas Monjalon Date: Wed, 20 May 2020 08:10:50 +0000 (+0200) Subject: examples/vm_power: drop Unix path limit redefinition X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=666272d20da3deb1fb41051b9f91a46a8363f2b0 examples/vm_power: drop Unix path limit redefinition The Unix socket path may be as long as UNIX_PATH_MAX. This constant is supposed to be defined in sys/un.h. On Linux, it appears to be in linux/un.h. This constant was re-defined locally, based on a variable declaration. It is breaking compilation with -fno-common (default in GCC 10) We could avoid the variable declaration by using NULL struct, but it looks simpler not redefining this system constant. As the power library and its examples are restricted to Linux only, the Linux header file is directly included. Fixes: 0d74597c1b4f ("examples/vm_power: fix max length of unix socket path") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon Acked-by: David Marchand Acked-by: Kevin Traynor --- diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c index 4d13697208..74a2a677e8 100644 --- a/examples/vm_power_manager/channel_manager.c +++ b/examples/vm_power_manager/channel_manager.c @@ -4,7 +4,6 @@ #include #include -#include #include #include #include diff --git a/examples/vm_power_manager/channel_manager.h b/examples/vm_power_manager/channel_manager.h index a2a2f2bba0..e55376fcdb 100644 --- a/examples/vm_power_manager/channel_manager.h +++ b/examples/vm_power_manager/channel_manager.h @@ -10,7 +10,7 @@ extern "C" { #endif #include -#include +#include #include #include @@ -26,11 +26,6 @@ extern "C" { /* FIFO file name template */ #define CHANNEL_MGR_FIFO_PATTERN_NAME "fifo" -#ifndef UNIX_PATH_MAX -struct sockaddr_un _sockaddr_un; -#define UNIX_PATH_MAX sizeof(_sockaddr_un.sun_path) -#endif - #define MAX_CLIENTS 64 #define MAX_VCPUS 20 diff --git a/examples/vm_power_manager/power_manager.c b/examples/vm_power_manager/power_manager.c index 7b4f4b3c4d..cd51d4741f 100644 --- a/examples/vm_power_manager/power_manager.c +++ b/examples/vm_power_manager/power_manager.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include