diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-06-10 15:49:59 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-06-14 08:27:03 +0200 |
| commit | 7fe02715aac68b958250b43f9d48d641af0a045c (patch) | |
| tree | 7bc866f87999991ef0a3ffa0dd36ce91444e5172 /embed_server.h | |
| parent | e8259865f41ceb50dd28b267186d11c62a465135 (diff) | |
| download | ffwd-7fe02715aac68b958250b43f9d48d641af0a045c.tar.gz ffwd-7fe02715aac68b958250b43f9d48d641af0a045c.zip | |
build: export only the public API from the shared library
Diffstat (limited to 'embed_server.h')
| -rw-r--r-- | embed_server.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/embed_server.h b/embed_server.h index c38f0ca..179ed0b 100644 --- a/embed_server.h +++ b/embed_server.h @@ -1,6 +1,17 @@ #ifndef PPLX_SERVER_H #define PPLX_SERVER_H +/* Public-API export annotation. The libraries are built with + * -fvisibility=hidden, so only declarations carrying PPLX_API are exported + * from the shared library; everything else stays internal. */ +#ifndef PPLX_API +#if defined(__GNUC__) +#define PPLX_API __attribute__((visibility("default"))) +#else +#define PPLX_API +#endif +#endif + #include <stdbool.h> typedef struct { @@ -27,6 +38,6 @@ typedef struct { const char *api_key; } pplx_server_config_t; -int pplx_run_server(const pplx_server_config_t *cfg); +PPLX_API int pplx_run_server(const pplx_server_config_t *cfg); #endif |
