package/dhcp/S80dhcp-server: allow empty INTERFACES
[buildroot-gz.git] / package / libcue / 0001-_unused-fix.patch
blob8a5891932538df64f9f44ebc4f3f5fc969b9072e
1 [PATCH] fix build on uClibc
3 Use cue_unused / cue_dead2 for the unused/non-returning annotation macros,
4 as uClibc defines a struct member called __unused in stdio.h when built
5 with locale support, breaking the build.
7 According to ANSI C 4.1.2.1, defines beginning with '__' are reserved
8 for the implementation, so shouldn't be used in user code.
10 Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
11 ---
12 src/libcue/cue_scanner.c | 10 ++++++----
13 1 file changed, 6 insertions(+), 4 deletions(-)
15 Index: libcue-1.4.0/src/libcue/cue_scanner.c
16 ===================================================================
17 --- libcue-1.4.0.orig/src/libcue/cue_scanner.c
18 +++ libcue-1.4.0/src/libcue/cue_scanner.c
19 @@ -7,9 +7,11 @@
21 #if defined(__FreeBSD__)
22 #include <sys/cdefs.h>
23 +#define cue_unused __unused
24 +#define cue_dead2 __dead2
25 #else
26 -#define __unused
27 -#define __dead2
28 +#define cue_unused
29 +#define cue_dead2
30 #endif
32 #define FLEX_SCANNER
33 @@ -248,7 +250,7 @@
34 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
36 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
37 -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) __unused;
38 +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) cue_unused;
39 static void yy_flex_free YY_PROTO(( void * ));
41 #define yy_new_buffer yy_create_buffer
42 @@ -285,7 +287,7 @@
43 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
44 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
45 static int yy_get_next_buffer YY_PROTO(( void ));
46 -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )) __dead2;
47 +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )) cue_dead2;
49 /* Done after the current pattern has been matched and before the
50 * corresponding action - sets up yytext.