diff options
-rwxr-xr-x | extras/scripts/build_static_vppctl.sh | 2 | ||||
-rw-r--r-- | src/vpp/app/vppctl.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/extras/scripts/build_static_vppctl.sh b/extras/scripts/build_static_vppctl.sh index dd8a6014d88..eafd24c3748 100755 --- a/extras/scripts/build_static_vppctl.sh +++ b/extras/scripts/build_static_vppctl.sh @@ -1,4 +1,5 @@ #/bin/env bash +set -eu src=$(realpath $(dirname $0)/../..)/src @@ -8,6 +9,7 @@ ${CC:-cc} \ -O2 \ -flto \ -static \ + -D STATIC_VPPCTL \ -I ${src} \ -g \ ${src}/vpp/app/vppctl.c \ diff --git a/src/vpp/app/vppctl.c b/src/vpp/app/vppctl.c index 7c9651784e6..f1d69c3ca84 100644 --- a/src/vpp/app/vppctl.c +++ b/src/vpp/app/vppctl.c @@ -34,7 +34,9 @@ #include <vppinfra/clib.h> #include <arpa/telnet.h> +#ifndef STATIC_VPPCTL #include <vpp/vnet/config.h> +#endif #define SOCKET_FILE "/run/vpp/cli.sock" @@ -162,7 +164,7 @@ process_input (int sock_fd, unsigned char *rx_buf, int rx_buf_len, return j; } -#ifdef CLIB_SANITIZE_ADDR +#if !defined(STATIC_VPPCTL) && defined(CLIB_SANITIZE_ADDR) /* default options for Address Sanitizer */ const char * __asan_default_options (void) |