Set default visibility to hidden

This commit is contained in:
Rodrigo Arias 2023-04-13 17:16:31 +02:00
parent 2b612166d7
commit 6fbdd8fd6b
2 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,8 @@ add_compile_options(-Wall -Wextra -Wformat
-Werror -Werror
) )
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED TRUE) set(CMAKE_C_STANDARD_REQUIRED TRUE)
set(CMAKE_C_EXTENSIONS FALSE) set(CMAKE_C_EXTENSIONS FALSE)

View File

@ -4,6 +4,8 @@
#ifndef OVNI_H #ifndef OVNI_H
#define OVNI_H #define OVNI_H
#pragma GCC visibility push(default)
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -171,4 +173,6 @@ void ovni_flush(void);
} }
#endif #endif
#pragma GCC visibility pop
#endif /* OVNI_H */ #endif /* OVNI_H */