Set appropriate symbol visibility attributes.
Fabian Greffrath
12 years ago
0 | Description: Set appropriate symbol visibility attributes. | |
1 | Author: Fabian Greffrath <fabian+debian@greffrath.com> | |
2 | ||
3 | --- faad2.orig/include/neaacdec.h | |
4 | +++ faad2/include/neaacdec.h | |
5 | @@ -63,6 +63,10 @@ extern "C" { | |
6 | #ifndef NEAACDECAPI | |
7 | #define NEAACDECAPI __cdecl | |
8 | #endif | |
9 | +#elif defined(__GNUC__) && __GNUC__ >= 4 | |
10 | + #ifndef NEAACDECAPI | |
11 | + #define NEAACDECAPI __attribute__((visibility("default"))) | |
12 | + #endif | |
13 | #else | |
14 | #ifndef NEAACDECAPI | |
15 | #define NEAACDECAPI | |
16 | @@ -198,7 +202,7 @@ typedef struct NeAACDecFrameInfo | |
17 | unsigned char ps; | |
18 | } NeAACDecFrameInfo; | |
19 | ||
20 | -char* NEAACDECAPI NeAACDecGetErrorMessage(unsigned char errcode); | |
21 | +NEAACDECAPI char* NeAACDecGetErrorMessage(unsigned char errcode); | |
22 | ||
23 | unsigned long NEAACDECAPI NeAACDecGetCapabilities(void); | |
24 | ||
25 | @@ -231,12 +235,12 @@ void NEAACDECAPI NeAACDecPostSeekReset(N | |
26 | ||
27 | void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder); | |
28 | ||
29 | -void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder, | |
30 | +NEAACDECAPI void* NeAACDecDecode(NeAACDecHandle hDecoder, | |
31 | NeAACDecFrameInfo *hInfo, | |
32 | unsigned char *buffer, | |
33 | unsigned long buffer_size); | |
34 | ||
35 | -void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder, | |
36 | +NEAACDECAPI void* NeAACDecDecode2(NeAACDecHandle hDecoder, | |
37 | NeAACDecFrameInfo *hInfo, | |
38 | unsigned char *buffer, | |
39 | unsigned long buffer_size, | |
40 | --- faad2.orig/libfaad/Makefile.am | |
41 | +++ faad2/libfaad/Makefile.am | |
42 | @@ -1,6 +1,7 @@ | |
43 | lib_LTLIBRARIES = libfaad.la | |
44 | ||
45 | -AM_CFLAGS = -iquote $(top_srcdir)/include | |
46 | +AM_CFLAGS = -iquote $(top_srcdir)/include \ | |
47 | + -fvisibility=hidden | |
48 | include_HEADERS = $(top_srcdir)/include/faad.h \ | |
49 | $(top_srcdir)/include/neaacdec.h | |
50 |