mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-31 13:07:34 +00:00
Hide non-exported symbols when linking the library
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
061605020c
commit
4f9339df94
1
Makefile
1
Makefile
@ -6,6 +6,7 @@ CFLAGS = -g -O2
|
||||
|
||||
BASIC_CFLAGS := -Isrc
|
||||
BASIC_CFLAGS += -DGIT__PRIVATE
|
||||
BASIC_CFLAGS += -fvisibility=hidden
|
||||
|
||||
OBJS = $(patsubst %.c,%.o,$(wildcard src/*.c))
|
||||
HDRS = $(wildcard src/*.h)
|
||||
|
||||
@ -56,7 +56,11 @@
|
||||
GIT_BEGIN_DECL
|
||||
|
||||
/** Declare a public function exported for application use. */
|
||||
#define GIT_EXTERN(type) type
|
||||
#ifdef __GNUC__
|
||||
# define GIT_EXTERN(type) __attribute__((visibility("default"))) type
|
||||
#else
|
||||
# define GIT_EXTERN(type) type
|
||||
#endif
|
||||
|
||||
/** Generic result code for any API call. */
|
||||
typedef int git_result_t;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user