The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / libcue / 0001-_unused-fix.patch
1 [PATCH] fix build on uClibc
2
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.
6
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.
9
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(-)
14
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 @@
20  
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
31  
32  #define FLEX_SCANNER
33 @@ -248,7 +250,7 @@
34  YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
35  
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 * ));
40  
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;
48  
49  /* Done after the current pattern has been matched and before the
50   * corresponding action - sets up yytext.