global: change all instances of USE_EGLIBC to USE_GLIBC
[openwrt/svn-archive/packages.git] / utils / xz / patches / 010-compile.patch
1 --- a/src/lzmainfo/Makefile.am
2 +++ b/src/lzmainfo/Makefile.am
3 @@ -20,7 +20,8 @@ lzmainfo_CPPFLAGS = \
4 -DLOCALEDIR=\"$(localedir)\" \
5 -I$(top_srcdir)/src/common \
6 -I$(top_srcdir)/src/liblzma/api \
7 - -I$(top_builddir)/lib
8 + -I$(top_builddir)/lib \
9 + -std=gnu99
10
11 lzmainfo_LDADD = $(top_builddir)/src/liblzma/liblzma.la
12
13 --- a/src/liblzma/common/common.h
14 +++ b/src/liblzma/common/common.h
15 @@ -89,9 +89,9 @@ typedef lzma_ret (*lzma_init_function)(
16 /// function prototype.
17 typedef lzma_ret (*lzma_code_function)(
18 lzma_coder *coder, lzma_allocator *allocator,
19 - const uint8_t *restrict in, size_t *restrict in_pos,
20 - size_t in_size, uint8_t *restrict out,
21 - size_t *restrict out_pos, size_t out_size,
22 + const uint8_t *in, size_t *in_pos,
23 + size_t in_size, uint8_t *out,
24 + size_t *out_pos, size_t out_size,
25 lzma_action action);
26
27 /// Type of a function to free the memory allocated for the coder
28 @@ -235,9 +235,9 @@ extern void lzma_next_end(lzma_next_code
29
30 /// Copy as much data as possible from in[] to out[] and update *in_pos
31 /// and *out_pos accordingly. Returns the number of bytes copied.
32 -extern size_t lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos,
33 - size_t in_size, uint8_t *restrict out,
34 - size_t *restrict out_pos, size_t out_size);
35 +extern size_t lzma_bufcpy(const uint8_t *in, size_t *in_pos,
36 + size_t in_size, uint8_t *out,
37 + size_t *out_pos, size_t out_size);
38
39
40 /// \brief Return if expression doesn't evaluate to LZMA_OK
41 --- a/src/liblzma/common/common.c
42 +++ b/src/liblzma/common/common.c
43 @@ -70,9 +70,9 @@ lzma_free(void *ptr, lzma_allocator *all
44 //////////
45
46 extern size_t
47 -lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos,
48 - size_t in_size, uint8_t *restrict out,
49 - size_t *restrict out_pos, size_t out_size)
50 +lzma_bufcpy(const uint8_t *in, size_t *in_pos,
51 + size_t in_size, uint8_t *out,
52 + size_t *out_pos, size_t out_size)
53 {
54 const size_t in_avail = in_size - *in_pos;
55 const size_t out_avail = out_size - *out_pos;
56 --- a/src/liblzma/Makefile.am
57 +++ b/src/liblzma/Makefile.am
58 @@ -23,7 +23,8 @@ liblzma_la_CPPFLAGS = \
59 -I$(top_srcdir)/src/liblzma/delta \
60 -I$(top_srcdir)/src/liblzma/simple \
61 -I$(top_srcdir)/src/common \
62 - -DTUKLIB_SYMBOL_PREFIX=lzma_
63 + -DTUKLIB_SYMBOL_PREFIX=lzma_ \
64 + -std=gnu99
65 liblzma_la_LDFLAGS = -no-undefined -version-info 5:4:0
66
67 include $(srcdir)/common/Makefile.inc
68 --- a/src/xz/Makefile.am
69 +++ b/src/xz/Makefile.am
70 @@ -46,7 +46,8 @@ xz_CPPFLAGS = \
71 -DLOCALEDIR=\"$(localedir)\" \
72 -I$(top_srcdir)/src/common \
73 -I$(top_srcdir)/src/liblzma/api \
74 - -I$(top_builddir)/lib
75 + -I$(top_builddir)/lib \
76 + -std=gnu99
77
78 xz_LDADD = $(top_builddir)/src/liblzma/liblzma.la
79