From a10ce5a8a5cee0abfc8b5c44b3d1fb66712d2f25 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Mon, 20 Jul 2020 16:11:48 +0200 Subject: [PATCH] error: hide unnecessary symbols Signed-off-by: Christian Brauner --- src/lxc/Makefile.am | 2 +- src/lxc/error.c | 2 +- src/lxc/error.h | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am index de22ab0cd..d1a4498cd 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -518,7 +518,7 @@ if ENABLE_COMMANDS # Binaries shipping with liblxc init_lxc_SOURCES = cmd/lxc_init.c \ compiler.h \ - error.h \ + error.c error.h \ initutils.c initutils.h \ memory_utils.h \ parse.c parse.h \ diff --git a/src/lxc/error.c b/src/lxc/error.c index 6e49eca2d..51fe5092a 100644 --- a/src/lxc/error.c +++ b/src/lxc/error.c @@ -18,7 +18,7 @@ lxc_log_define(error, lxc); * 128+n signal n received by the application * 255 lxc error */ -extern int lxc_error_set_and_log(int pid, int status) +int lxc_error_set_and_log(int pid, int status) { int ret = 0; diff --git a/src/lxc/error.h b/src/lxc/error.h index 49323d5bf..393458520 100644 --- a/src/lxc/error.h +++ b/src/lxc/error.h @@ -6,6 +6,8 @@ #define LXC_CLONE_ERROR "Failed to clone a new set of namespaces" #define LXC_UNPRIV_EOPNOTSUPP "the requested function %s is not currently supported with unprivileged containers" -extern int lxc_error_set_and_log(int pid, int status); +#include "compiler.h" + +__hidden extern int lxc_error_set_and_log(int pid, int status); #endif -- 2.47.2