From 6fbdd8fd6bccff3314a931ba0c57387870aef0ef Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Thu, 13 Apr 2023 17:16:31 +0200 Subject: [PATCH] Set default visibility to hidden --- CMakeLists.txt | 2 ++ include/ovni.h.in | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f8fffb..9ea2b2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,8 @@ add_compile_options(-Wall -Wextra -Wformat -Werror ) +set(CMAKE_C_VISIBILITY_PRESET hidden) + set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED TRUE) set(CMAKE_C_EXTENSIONS FALSE) diff --git a/include/ovni.h.in b/include/ovni.h.in index 88c38ab..e54b744 100644 --- a/include/ovni.h.in +++ b/include/ovni.h.in @@ -4,6 +4,8 @@ #ifndef OVNI_H #define OVNI_H +#pragma GCC visibility push(default) + #ifdef __cplusplus extern "C" { #endif @@ -171,4 +173,6 @@ void ovni_flush(void); } #endif +#pragma GCC visibility pop + #endif /* OVNI_H */