From: Christian Brauner Date: Mon, 20 Jul 2020 15:47:58 +0000 (+0200) Subject: mainloop: hide unnecessary symbols X-Git-Tag: lxc-5.0.0~384^2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d50aa57f9b769df9f3a4dbfd80e44b61d5483055;p=thirdparty%2Flxc.git mainloop: hide unnecessary symbols Signed-off-by: Christian Brauner --- diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am index 2caaaad25..fd3eec994 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -553,6 +553,7 @@ lxc_stop_SOURCES = tools/lxc_stop.c \ file_utils.c file_utils.h \ initutils.c initutils.h \ log.c log.h \ + mainloop.c mainloop.h \ string_utils.c string_utils.h if ENABLE_SECCOMP lxc_stop_SOURCES += seccomp.c lxcseccomp.h @@ -568,6 +569,7 @@ lxc_top_SOURCES = tools/lxc_top.c \ file_utils.c file_utils.h \ initutils.c initutils.h \ log.c log.h \ + mainloop.c mainloop.h \ string_utils.c string_utils.h if ENABLE_SECCOMP lxc_top_SOURCES += seccomp.c lxcseccomp.h diff --git a/src/lxc/mainloop.h b/src/lxc/mainloop.h index e6ab9a6d9..2a16c94e0 100644 --- a/src/lxc/mainloop.h +++ b/src/lxc/mainloop.h @@ -5,6 +5,7 @@ #include +#include "compiler.h" #include "list.h" #include "memory_utils.h" @@ -20,21 +21,18 @@ struct lxc_epoll_descr { typedef int (*lxc_mainloop_callback_t)(int fd, uint32_t event, void *data, struct lxc_epoll_descr *descr); -extern int lxc_mainloop(struct lxc_epoll_descr *descr, int timeout_ms); +__hidden extern int lxc_mainloop(struct lxc_epoll_descr *descr, int timeout_ms); -extern int lxc_mainloop_add_handler_events(struct lxc_epoll_descr *descr, - int fd, int events, - lxc_mainloop_callback_t callback, - void *data); -extern int lxc_mainloop_add_handler(struct lxc_epoll_descr *descr, int fd, - lxc_mainloop_callback_t callback, - void *data); +__hidden extern int lxc_mainloop_add_handler_events(struct lxc_epoll_descr *descr, int fd, int events, + lxc_mainloop_callback_t callback, void *data); +__hidden extern int lxc_mainloop_add_handler(struct lxc_epoll_descr *descr, int fd, + lxc_mainloop_callback_t callback, void *data); -extern int lxc_mainloop_del_handler(struct lxc_epoll_descr *descr, int fd); +__hidden extern int lxc_mainloop_del_handler(struct lxc_epoll_descr *descr, int fd); -extern int lxc_mainloop_open(struct lxc_epoll_descr *descr); +__hidden extern int lxc_mainloop_open(struct lxc_epoll_descr *descr); -extern void lxc_mainloop_close(struct lxc_epoll_descr *descr); +__hidden extern void lxc_mainloop_close(struct lxc_epoll_descr *descr); define_cleanup_function(struct lxc_epoll_descr *, lxc_mainloop_close); diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index 064b2b0f6..b660e0a0d 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -18,6 +18,7 @@ lxc_test_api_reboot_SOURCES = api_reboot.c \ ../lxc/file_utils.c ../lxc/file_utils.h \ ../lxc/initutils.c ../lxc/initutils.h \ ../lxc/log.c ../lxc/log.h \ + ../lxc/mainloop.c ../lxc/mainloop.h \ ../lxc/network.c ../lxc/network.h \ ../lxc/nl.c ../lxc/nl.h \ ../lxc/string_utils.c ../lxc/string_utils.h @@ -37,6 +38,7 @@ lxc_test_attach_SOURCES = attach.c \ ../lxc/file_utils.c ../lxc/file_utils.h \ ../lxc/initutils.c ../lxc/initutils.h \ ../lxc/log.c ../lxc/log.h \ + ../lxc/mainloop.c ../lxc/mainloop.h \ ../lxc/network.c ../lxc/network.h \ ../lxc/nl.c ../lxc/nl.h \ ../lxc/string_utils.c ../lxc/string_utils.h @@ -56,6 +58,7 @@ lxc_test_cgpath_SOURCES = cgpath.c \ ../lxc/file_utils.c ../lxc/file_utils.h \ ../lxc/initutils.c ../lxc/initutils.h \ ../lxc/log.c ../lxc/log.h \ + ../lxc/mainloop.c ../lxc/mainloop.h \ ../lxc/network.c ../lxc/network.h \ ../lxc/nl.c ../lxc/nl.h \ ../lxc/string_utils.c ../lxc/string_utils.h @@ -77,6 +80,7 @@ lxc_test_config_jump_table_SOURCES = config_jump_table.c \ ../lxc/file_utils.c ../lxc/file_utils.h \ ../lxc/initutils.c ../lxc/initutils.h \ ../lxc/log.c ../lxc/log.h \ + ../lxc/mainloop.c ../lxc/mainloop.h \ ../lxc/network.c ../lxc/network.h \ ../lxc/nl.c ../lxc/nl.h \ ../lxc/string_utils.c ../lxc/string_utils.h @@ -159,6 +163,7 @@ lxc_test_utils_SOURCES = lxc-test-utils.c \ ../lxc/file_utils.c ../lxc/file_utils.h \ ../lxc/initutils.c ../lxc/initutils.h \ ../lxc/log.c ../lxc/log.h \ + ../lxc/mainloop.c ../lxc/mainloop.h \ ../lxc/network.c ../lxc/network.h \ ../lxc/nl.c ../lxc/nl.h \ ../lxc/string_utils.c ../lxc/string_utils.h