Mark all symbols hidden by default, export only required ones
This commit is contained in:
@@ -13,6 +13,8 @@ struct addr_mask_t
|
||||
uint8_t bits;
|
||||
};
|
||||
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
bool string_to_addr(std::string str, bool parse_port, int default_port, struct sockaddr_storage *addr);
|
||||
std::string addr_to_string(const sockaddr_storage &addr);
|
||||
addr_mask_t cidr_parse(std::string mask);
|
||||
@@ -22,3 +24,5 @@ bool cidr_sockaddr_match(const sockaddr_storage &addr, const addr_mask_t &mask);
|
||||
std::vector<std::string> getifaddr_list(const std::vector<addr_mask_t> & masks = std::vector<addr_mask_t>(), bool include_v6 = false);
|
||||
int create_and_bind_socket(std::string bind_address, int bind_port, int listen_backlog, int *listening_port);
|
||||
std::string gethostname_str();
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
// Hierarchical bitmap allocator
|
||||
class allocator_t
|
||||
{
|
||||
@@ -25,3 +27,5 @@ public:
|
||||
void bitmap_set(void *bitmap, uint64_t start, uint64_t len, uint64_t bitmap_granularity);
|
||||
void bitmap_clear(void *bitmap, uint64_t start, uint64_t len, uint64_t bitmap_granularity);
|
||||
bool bitmap_check(void *bitmap, uint64_t start, uint64_t len, uint64_t bitmap_granularity);
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
// unsigned __int64 _mm_crc32_u64 (unsigned __int64 crc, unsigned __int64 v)
|
||||
// unsigned int _mm_crc32_u8 (unsigned int crc, unsigned char v)
|
||||
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -17,3 +19,5 @@ uint32_t crc32c_nopad(uint32_t prev_crc, const void *buf, size_t len, size_t lef
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "ringloop.h"
|
||||
#include "timerfd_manager.h"
|
||||
|
||||
class epoll_manager_t
|
||||
class __attribute__((visibility("default"))) epoll_manager_t
|
||||
{
|
||||
int epoll_fd;
|
||||
bool pending;
|
||||
|
||||
@@ -8,7 +8,11 @@
|
||||
|
||||
#include "json11/json11.hpp"
|
||||
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
std::map<std::string, std::string> json_to_string_map(const json11::Json::object & config);
|
||||
bool json_is_true(const json11::Json & val);
|
||||
bool json_is_false(const json11::Json & val);
|
||||
std::string implode(const std::string & sep, json11::Json array);
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
inline void* memalign_or_die(size_t alignment, size_t size)
|
||||
{
|
||||
void *buf = memalign(alignment, size);
|
||||
@@ -49,3 +51,5 @@ inline void* calloc_or_die(size_t nmemb, size_t size)
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ struct ring_consumer_t
|
||||
std::function<void(void)> loop;
|
||||
};
|
||||
|
||||
class ring_loop_t
|
||||
class __attribute__((visibility("default"))) ring_loop_t
|
||||
{
|
||||
std::vector<std::function<void()>> immediate_queue, immediate_queue2;
|
||||
std::vector<ring_consumer_t*> consumers;
|
||||
|
||||
@@ -6,8 +6,12 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
size_t read_blocking(int fd, void *read_buf, size_t remaining);
|
||||
size_t write_blocking(int fd, void *write_buf, size_t remaining);
|
||||
int readv_blocking(int fd, iovec *iov, int iovcnt);
|
||||
int writev_blocking(int fd, iovec *iov, int iovcnt);
|
||||
int sendv_blocking(int fd, iovec *iov, int iovcnt, int flags);
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
/*************************** HEADER FILES ***************************/
|
||||
#include <stddef.h>
|
||||
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
/****************************** MACROS ******************************/
|
||||
#define SHA256_BLOCK_SIZE 32 // SHA256 outputs a 32 byte digest
|
||||
|
||||
@@ -38,4 +40,6 @@ void sha256_final(SHA256_CTX *ctx, BYTE hash[]);
|
||||
};
|
||||
#endif
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
#endif // SHA256_H
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
#define is_white(a) ((a) == ' ' || (a) == '\t' || (a) == '\r' || (a) == '\n')
|
||||
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
std::string base64_encode(const std::string &in);
|
||||
std::string base64_decode(const std::string &in);
|
||||
uint64_t parse_size(std::string size_str, bool *ok = NULL);
|
||||
@@ -32,3 +34,5 @@ std::string addslashes(const std::string & str, const char *toescape = "\\\"");
|
||||
std::string realpath_str(std::string path, bool nofail = true);
|
||||
std::string format_datetime(uint64_t unixtime);
|
||||
bool is_zero(void *buf, size_t size);
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
@@ -16,7 +16,7 @@ struct timerfd_timer_t
|
||||
std::function<void(int)> callback;
|
||||
};
|
||||
|
||||
class timerfd_manager_t
|
||||
class __attribute__((visibility("default"))) timerfd_manager_t
|
||||
{
|
||||
int wait_state = 0;
|
||||
int timerfd;
|
||||
|
||||
Reference in New Issue
Block a user