]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
020ffa141bf21900850915f866ff9e9bd8a10db4
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From 054fedda5ab9b84160d40d90cb967f2f5822b889 Mon Sep 17 00:00:00 2001
2 From: Khem Raj <raj.khem@gmail.com>
3 Date: Thu, 31 Dec 2015 06:35:34 +0000
4 Subject: [PATCH] build: Provide alternatives for glibc assumptions helps
5 compiling it on musl
6
7 Upstream-Status: Pending
8 Signed-off-by: Khem Raj <raj.khem@gmail.com>
9
10 Rebase to 0.68
11 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
12 ---
13 Makefile.am | 2 +-
14 lib/color.c | 3 ++-
15 lib/crc32_file.c | 1 +
16 lib/fixedsizehash.h | 1 -
17 lib/system.h | 10 ++++++++++
18 lib/xmalloc.c | 2 +-
19 libasm/asm_end.c | 2 +-
20 libasm/asm_newscn.c | 2 +-
21 libcpu/i386_gendis.c | 2 +-
22 libcpu/i386_lex.c | 2 +-
23 libcpu/i386_parse.c | 2 +-
24 libdw/Makefile.am | 4 +++-
25 libdw/libdw_alloc.c | 2 +-
26 libdwfl/dwfl_build_id_find_elf.c | 3 ++-
27 libdwfl/dwfl_error.c | 4 +++-
28 libdwfl/dwfl_module_getdwarf.c | 1 +
29 libdwfl/find-debuginfo.c | 2 +-
30 libdwfl/libdwfl_crc32_file.c | 10 ++++++++++
31 libdwfl/linux-kernel-modules.c | 1 +
32 libebl/eblopenbackend.c | 2 +-
33 libelf/elf.h | 8 ++++++--
34 libelf/libelf.h | 1 +
35 libelf/libelfP.h | 1 +
36 src/addr2line.c | 2 +-
37 src/ar.c | 2 +-
38 src/arlib.c | 2 +-
39 src/arlib2.c | 2 +-
40 src/elfcmp.c | 2 +-
41 src/elflint.c | 2 +-
42 src/findtextrel.c | 2 +-
43 src/nm.c | 2 +-
44 src/objdump.c | 2 +-
45 src/ranlib.c | 2 +-
46 src/readelf.c | 2 +-
47 src/size.c | 2 +-
48 src/stack.c | 2 +-
49 src/strings.c | 2 +-
50 src/strip.c | 2 +-
51 src/unstrip.c | 2 +-
52 tests/addrscopes.c | 2 +-
53 tests/allregs.c | 2 +-
54 tests/backtrace-data.c | 2 +-
55 tests/backtrace-dwarf.c | 2 +-
56 tests/backtrace.c | 2 +-
57 tests/buildid.c | 2 +-
58 tests/debugaltlink.c | 2 +-
59 tests/debuglink.c | 2 +-
60 tests/deleted.c | 2 +-
61 tests/dwfl-addr-sect.c | 2 +-
62 tests/dwfl-bug-addr-overflow.c | 2 +-
63 tests/dwfl-bug-fd-leak.c | 2 +-
64 tests/dwfl-bug-getmodules.c | 2 +-
65 tests/dwfl-report-elf-align.c | 2 +-
66 tests/dwfllines.c | 2 +-
67 tests/dwflmodtest.c | 2 +-
68 tests/dwflsyms.c | 2 +-
69 tests/early-offscn.c | 2 +-
70 tests/ecp.c | 2 +-
71 tests/find-prologues.c | 2 +-
72 tests/funcretval.c | 2 +-
73 tests/funcscopes.c | 2 +-
74 tests/getsrc_die.c | 2 +-
75 tests/line2addr.c | 2 +-
76 tests/low_high_pc.c | 2 +-
77 tests/md5-sha1-test.c | 2 +-
78 tests/rdwrmmap.c | 2 +-
79 tests/saridx.c | 2 +-
80 tests/sectiondump.c | 2 +-
81 tests/varlocs.c | 2 +-
82 tests/vdsosyms.c | 2 +-
83 70 files changed, 98 insertions(+), 64 deletions(-)
84
85 diff --git a/Makefile.am b/Makefile.am
86 index 2ff444e..41f77df 100644
87 --- a/Makefile.am
88 +++ b/Makefile.am
89 @@ -28,7 +28,7 @@ pkginclude_HEADERS = version.h
90
91 # Add doc back when we have some real content.
92 SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
93 - backends src po tests
94 + backends po tests
95
96 EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
97 COPYING COPYING-GPLV2 COPYING-LGPLV3
98 diff --git a/lib/color.c b/lib/color.c
99 index fde2d9d..73292ac 100644
100 --- a/lib/color.c
101 +++ b/lib/color.c
102 @@ -32,12 +32,13 @@
103 #endif
104
105 #include <argp.h>
106 -#include <error.h>
107 +#include <err.h>
108 #include <libintl.h>
109 #include <stdlib.h>
110 #include <string.h>
111 #include <unistd.h>
112 #include "libeu.h"
113 +#include "system.h"
114
115
116 /* Prototype for option handler. */
117 diff --git a/lib/crc32_file.c b/lib/crc32_file.c
118 index a8434d4..57e4298 100644
119 --- a/lib/crc32_file.c
120 +++ b/lib/crc32_file.c
121 @@ -35,6 +35,7 @@
122 #include <unistd.h>
123 #include <sys/stat.h>
124 #include <sys/mman.h>
125 +#include "system.h"
126
127 int
128 crc32_file (int fd, uint32_t *resp)
129 diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h
130 index dac2a5f..43016fc 100644
131 --- a/lib/fixedsizehash.h
132 +++ b/lib/fixedsizehash.h
133 @@ -30,7 +30,6 @@
134 #include <errno.h>
135 #include <stdlib.h>
136 #include <string.h>
137 -#include <sys/cdefs.h>
138
139 #include <system.h>
140
141 diff --git a/lib/system.h b/lib/system.h
142 index ccd99d6..0e93e60 100644
143 --- a/lib/system.h
144 +++ b/lib/system.h
145 @@ -55,6 +55,16 @@
146 #else
147 # error "Unknown byte order"
148 #endif
149 +#ifndef TEMP_FAILURE_RETRY
150 +#define TEMP_FAILURE_RETRY(expression) \
151 + (__extension__ \
152 + ({ long int __result; \
153 + do __result = (long int) (expression); \
154 + while (__result == -1L && errno == EINTR); \
155 + __result; }))
156 +#endif
157 +
158 +#define error(status, errno, ...) err(status, __VA_ARGS__)
159
160 #ifndef MAX
161 #define MAX(m, n) ((m) < (n) ? (n) : (m))
162 diff --git a/lib/xmalloc.c b/lib/xmalloc.c
163 index 0cde384..217b054 100644
164 --- a/lib/xmalloc.c
165 +++ b/lib/xmalloc.c
166 @@ -30,7 +30,7 @@
167 # include <config.h>
168 #endif
169
170 -#include <error.h>
171 +#include <err.h>
172 #include <libintl.h>
173 #include <stddef.h>
174 #include <stdlib.h>
175 diff --git a/libasm/asm_end.c b/libasm/asm_end.c
176 index 191a535..bf5ab06 100644
177 --- a/libasm/asm_end.c
178 +++ b/libasm/asm_end.c
179 @@ -32,7 +32,7 @@
180 #endif
181
182 #include <assert.h>
183 -#include <error.h>
184 +#include <err.h>
185 #include <libintl.h>
186 #include <stdio.h>
187 #include <stdlib.h>
188 diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c
189 index ddbb25d..74a598d 100644
190 --- a/libasm/asm_newscn.c
191 +++ b/libasm/asm_newscn.c
192 @@ -32,7 +32,7 @@
193 #endif
194
195 #include <assert.h>
196 -#include <error.h>
197 +#include <err.h>
198 #include <libintl.h>
199 #include <stdlib.h>
200 #include <string.h>
201 diff --git a/libcpu/i386_gendis.c b/libcpu/i386_gendis.c
202 index aae5eae..6d76016 100644
203 --- a/libcpu/i386_gendis.c
204 +++ b/libcpu/i386_gendis.c
205 @@ -31,7 +31,7 @@
206 # include <config.h>
207 #endif
208
209 -#include <error.h>
210 +#include <err.h>
211 #include <errno.h>
212 #include <stdio.h>
213 #include <stdlib.h>
214 diff --git a/libcpu/i386_lex.c b/libcpu/i386_lex.c
215 index b670608..b842c25 100644
216 --- a/libcpu/i386_lex.c
217 +++ b/libcpu/i386_lex.c
218 @@ -592,7 +592,7 @@ char *i386_text;
219 #endif
220
221 #include <ctype.h>
222 -#include <error.h>
223 +#include <err.h>
224 #include <libintl.h>
225
226 #include <libeu.h>
227 diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c
228 index 724addf..5b67802 100644
229 --- a/libcpu/i386_parse.c
230 +++ b/libcpu/i386_parse.c
231 @@ -107,7 +107,7 @@
232 #include <assert.h>
233 #include <ctype.h>
234 #include <errno.h>
235 -#include <error.h>
236 +#include <err.h>
237 #include <inttypes.h>
238 #include <libintl.h>
239 #include <math.h>
240 diff --git a/libdw/Makefile.am b/libdw/Makefile.am
241 index 082d96c..51cbea0 100644
242 --- a/libdw/Makefile.am
243 +++ b/libdw/Makefile.am
244 @@ -102,6 +102,8 @@ endif
245 libdw_pic_a_SOURCES =
246 am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
247
248 +fts_LDADD = -lfts
249 +
250 libdw_so_SOURCES =
251 libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
252 ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
253 @@ -112,7 +114,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
254 -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
255 -Wl,--version-script,$<,--no-undefined \
256 -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
257 - -ldl -lz $(argp_LDADD) $(zip_LIBS)
258 + -ldl -lz $(argp_LDADD) $(zip_LIBS) $(fts_LDADD)
259 @$(textrel_check)
260 $(AM_V_at)ln -fs $@ $@.$(VERSION)
261
262 diff --git a/libdw/libdw_alloc.c b/libdw/libdw_alloc.c
263 index 28a8cf6..29aeb3f 100644
264 --- a/libdw/libdw_alloc.c
265 +++ b/libdw/libdw_alloc.c
266 @@ -31,7 +31,7 @@
267 # include <config.h>
268 #endif
269
270 -#include <error.h>
271 +#include <err.h>
272 #include <errno.h>
273 #include <stdlib.h>
274 #include "libdwP.h"
275 diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c
276 index 903e193..b00d10c 100644
277 --- a/libdwfl/dwfl_build_id_find_elf.c
278 +++ b/libdwfl/dwfl_build_id_find_elf.c
279 @@ -27,6 +27,7 @@
280 not, see <http://www.gnu.org/licenses/>. */
281
282 #include "libdwflP.h"
283 +#include "system.h"
284 #include <inttypes.h>
285 #include <fcntl.h>
286 #include <unistd.h>
287 @@ -94,7 +95,7 @@ __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, char **file_name,
288 {
289 if (*file_name != NULL)
290 free (*file_name);
291 - *file_name = canonicalize_file_name (name);
292 + *file_name = realpath (name, NULL);
293 if (*file_name == NULL)
294 {
295 *file_name = name;
296 diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c
297 index 7bcf61c..c345797 100644
298 --- a/libdwfl/dwfl_error.c
299 +++ b/libdwfl/dwfl_error.c
300 @@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
301 const char *
302 dwfl_errmsg (int error)
303 {
304 + static __thread char s[64] = "";
305 if (error == 0 || error == -1)
306 {
307 int last_error = global_error;
308 @@ -154,7 +155,8 @@ dwfl_errmsg (int error)
309 switch (error &~ 0xffff)
310 {
311 case OTHER_ERROR (ERRNO):
312 - return strerror_r (error & 0xffff, "bad", 0);
313 + strerror_r (error & 0xffff, s, sizeof(s));
314 + return s;
315 case OTHER_ERROR (LIBELF):
316 return elf_errmsg (error & 0xffff);
317 case OTHER_ERROR (LIBDW):
318 diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c
319 index 0e8810b..82ad665 100644
320 --- a/libdwfl/dwfl_module_getdwarf.c
321 +++ b/libdwfl/dwfl_module_getdwarf.c
322 @@ -31,6 +31,7 @@
323 #include <fcntl.h>
324 #include <string.h>
325 #include <unistd.h>
326 +#include "system.h"
327 #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */
328 #include "../libelf/libelfP.h"
329
330 diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c
331 index 80515db..80b0148 100644
332 --- a/libdwfl/find-debuginfo.c
333 +++ b/libdwfl/find-debuginfo.c
334 @@ -385,7 +385,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod,
335 /* If FILE_NAME is a symlink, the debug file might be associated
336 with the symlink target name instead. */
337
338 - char *canon = canonicalize_file_name (file_name);
339 + char *canon = realpath (file_name, NULL);
340 if (canon != NULL && strcmp (file_name, canon))
341 fd = find_debuginfo_in_path (mod, canon,
342 debuglink_file, debuglink_crc,
343 diff --git a/libdwfl/libdwfl_crc32_file.c b/libdwfl/libdwfl_crc32_file.c
344 index 6b6b7d3..debc4a4 100644
345 --- a/libdwfl/libdwfl_crc32_file.c
346 +++ b/libdwfl/libdwfl_crc32_file.c
347 @@ -31,6 +31,16 @@
348
349 #define crc32_file attribute_hidden __libdwfl_crc32_file
350 #define crc32 __libdwfl_crc32
351 +
352 +#ifndef TEMP_FAILURE_RETRY
353 +#define TEMP_FAILURE_RETRY(expression) \
354 + (__extension__ \
355 + ({ long int __result; \
356 + do __result = (long int) (expression); \
357 + while (__result == -1L && errno == EINTR); \
358 + __result; }))
359 +#endif
360 +
361 #define LIB_SYSTEM_H 1
362 #include <libdwflP.h>
363 #include "../lib/crc32_file.c"
364 diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
365 index 9cd8ea9..4dbf4c5 100644
366 --- a/libdwfl/linux-kernel-modules.c
367 +++ b/libdwfl/linux-kernel-modules.c
368 @@ -36,6 +36,7 @@
369 #include <config.h>
370
371 #include "libdwflP.h"
372 +#include "system.h"
373 #include <inttypes.h>
374 #include <errno.h>
375 #include <stdio.h>
376 diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
377 index 34d439a..56d2345 100644
378 --- a/libebl/eblopenbackend.c
379 +++ b/libebl/eblopenbackend.c
380 @@ -32,7 +32,7 @@
381
382 #include <assert.h>
383 #include <dlfcn.h>
384 -#include <error.h>
385 +#include <err.h>
386 #include <libelfP.h>
387 #include <dwarf.h>
388 #include <stdlib.h>
389 diff --git a/libelf/elf.h b/libelf/elf.h
390 index 74654d6..81eee8b 100644
391 --- a/libelf/elf.h
392 +++ b/libelf/elf.h
393 @@ -21,7 +21,9 @@
394
395 #include <features.h>
396
397 -__BEGIN_DECLS
398 +#ifdef __cplusplus
399 +extern "C" {
400 +#endif
401
402 /* Standard ELF types. */
403
404 @@ -3704,6 +3706,8 @@ enum
405 #define R_BPF_NONE 0 /* No reloc */
406 #define R_BPF_MAP_FD 1 /* Map fd to pointer */
407
408 -__END_DECLS
409 +#ifdef __cplusplus
410 +}
411 +#endif
412
413 #endif /* elf.h */
414 diff --git a/libelf/libelf.h b/libelf/libelf.h
415 index c0d6389..38a68fd 100644
416 --- a/libelf/libelf.h
417 +++ b/libelf/libelf.h
418 @@ -29,6 +29,7 @@
419 #ifndef _LIBELF_H
420 #define _LIBELF_H 1
421
422 +#include <fcntl.h>
423 #include <stdint.h>
424 #include <sys/types.h>
425
426 diff --git a/libelf/libelfP.h b/libelf/libelfP.h
427 index 4459982..1296f20 100644
428 --- a/libelf/libelfP.h
429 +++ b/libelf/libelfP.h
430 @@ -36,6 +36,7 @@
431
432 #include <ar.h>
433 #include <gelf.h>
434 +#include <libelf.h>
435
436 #include <errno.h>
437 #include <stdbool.h>
438 diff --git a/src/addr2line.c b/src/addr2line.c
439 index 0222088..cd6a9a6 100644
440 --- a/src/addr2line.c
441 +++ b/src/addr2line.c
442 @@ -23,7 +23,7 @@
443 #include <argp.h>
444 #include <assert.h>
445 #include <errno.h>
446 -#include <error.h>
447 +#include <err.h>
448 #include <fcntl.h>
449 #include <inttypes.h>
450 #include <libdwfl.h>
451 diff --git a/src/ar.c b/src/ar.c
452 index f2f322b..6e70031 100644
453 --- a/src/ar.c
454 +++ b/src/ar.c
455 @@ -22,7 +22,7 @@
456
457 #include <argp.h>
458 #include <assert.h>
459 -#include <error.h>
460 +#include <err.h>
461 #include <fcntl.h>
462 #include <gelf.h>
463 #include <libintl.h>
464 diff --git a/src/arlib.c b/src/arlib.c
465 index e0839aa..1143658 100644
466 --- a/src/arlib.c
467 +++ b/src/arlib.c
468 @@ -21,7 +21,7 @@
469 #endif
470
471 #include <assert.h>
472 -#include <error.h>
473 +#include <err.h>
474 #include <gelf.h>
475 #include <inttypes.h>
476 #include <libintl.h>
477 diff --git a/src/arlib2.c b/src/arlib2.c
478 index 553fc57..46443d0 100644
479 --- a/src/arlib2.c
480 +++ b/src/arlib2.c
481 @@ -20,7 +20,7 @@
482 # include <config.h>
483 #endif
484
485 -#include <error.h>
486 +#include <err.h>
487 #include <libintl.h>
488 #include <limits.h>
489 #include <string.h>
490 diff --git a/src/elfcmp.c b/src/elfcmp.c
491 index 401ab31..873d253 100644
492 --- a/src/elfcmp.c
493 +++ b/src/elfcmp.c
494 @@ -23,7 +23,7 @@
495 #include <argp.h>
496 #include <assert.h>
497 #include <errno.h>
498 -#include <error.h>
499 +#include <err.h>
500 #include <fcntl.h>
501 #include <locale.h>
502 #include <libintl.h>
503 diff --git a/src/elflint.c b/src/elflint.c
504 index 7d3f227..074d21c 100644
505 --- a/src/elflint.c
506 +++ b/src/elflint.c
507 @@ -24,7 +24,7 @@
508 #include <assert.h>
509 #include <byteswap.h>
510 #include <endian.h>
511 -#include <error.h>
512 +#include <err.h>
513 #include <fcntl.h>
514 #include <gelf.h>
515 #include <inttypes.h>
516 diff --git a/src/findtextrel.c b/src/findtextrel.c
517 index dc41502..325888c 100644
518 --- a/src/findtextrel.c
519 +++ b/src/findtextrel.c
520 @@ -23,7 +23,7 @@
521 #include <argp.h>
522 #include <assert.h>
523 #include <errno.h>
524 -#include <error.h>
525 +#include <err.h>
526 #include <fcntl.h>
527 #include <gelf.h>
528 #include <libdw.h>
529 diff --git a/src/nm.c b/src/nm.c
530 index c54e96f..9e031d9 100644
531 --- a/src/nm.c
532 +++ b/src/nm.c
533 @@ -26,7 +26,7 @@
534 #include <ctype.h>
535 #include <dwarf.h>
536 #include <errno.h>
537 -#include <error.h>
538 +#include <err.h>
539 #include <fcntl.h>
540 #include <gelf.h>
541 #include <inttypes.h>
542 diff --git a/src/objdump.c b/src/objdump.c
543 index fff4b81..4b1f966 100644
544 --- a/src/objdump.c
545 +++ b/src/objdump.c
546 @@ -21,7 +21,7 @@
547 #endif
548
549 #include <argp.h>
550 -#include <error.h>
551 +#include <err.h>
552 #include <fcntl.h>
553 #include <inttypes.h>
554 #include <libintl.h>
555 diff --git a/src/ranlib.c b/src/ranlib.c
556 index 41a3bcf..0c7da2c 100644
557 --- a/src/ranlib.c
558 +++ b/src/ranlib.c
559 @@ -24,7 +24,7 @@
560 #include <argp.h>
561 #include <assert.h>
562 #include <errno.h>
563 -#include <error.h>
564 +#include <err.h>
565 #include <fcntl.h>
566 #include <gelf.h>
567 #include <libintl.h>
568 diff --git a/src/readelf.c b/src/readelf.c
569 index d18a4b7..a6cfb35 100644
570 --- a/src/readelf.c
571 +++ b/src/readelf.c
572 @@ -25,7 +25,7 @@
573 #include <ctype.h>
574 #include <dwarf.h>
575 #include <errno.h>
576 -#include <error.h>
577 +#include <err.h>
578 #include <fcntl.h>
579 #include <gelf.h>
580 #include <inttypes.h>
581 diff --git a/src/size.c b/src/size.c
582 index de0d791..4639d42 100644
583 --- a/src/size.c
584 +++ b/src/size.c
585 @@ -21,7 +21,7 @@
586 #endif
587
588 #include <argp.h>
589 -#include <error.h>
590 +#include <err.h>
591 #include <fcntl.h>
592 #include <gelf.h>
593 #include <inttypes.h>
594 diff --git a/src/stack.c b/src/stack.c
595 index a5a7beb..4c075bc 100644
596 --- a/src/stack.c
597 +++ b/src/stack.c
598 @@ -18,7 +18,7 @@
599 #include <config.h>
600 #include <assert.h>
601 #include <argp.h>
602 -#include <error.h>
603 +#include <err.h>
604 #include <stdlib.h>
605 #include <inttypes.h>
606 #include <stdio.h>
607 diff --git a/src/strings.c b/src/strings.c
608 index 49aab8b..09d5b1c 100644
609 --- a/src/strings.c
610 +++ b/src/strings.c
611 @@ -25,7 +25,7 @@
612 #include <ctype.h>
613 #include <endian.h>
614 #include <errno.h>
615 -#include <error.h>
616 +#include <err.h>
617 #include <fcntl.h>
618 #include <gelf.h>
619 #include <inttypes.h>
620 diff --git a/src/strip.c b/src/strip.c
621 index a875ddf..fd76f7f 100644
622 --- a/src/strip.c
623 +++ b/src/strip.c
624 @@ -24,7 +24,7 @@
625 #include <assert.h>
626 #include <byteswap.h>
627 #include <endian.h>
628 -#include <error.h>
629 +#include <err.h>
630 #include <fcntl.h>
631 #include <gelf.h>
632 #include <libelf.h>
633 diff --git a/src/unstrip.c b/src/unstrip.c
634 index d838ae9..0108272 100644
635 --- a/src/unstrip.c
636 +++ b/src/unstrip.c
637 @@ -31,7 +31,7 @@
638 #include <argp.h>
639 #include <assert.h>
640 #include <errno.h>
641 -#include <error.h>
642 +#include <err.h>
643 #include <fcntl.h>
644 #include <fnmatch.h>
645 #include <libintl.h>
646 diff --git a/tests/addrscopes.c b/tests/addrscopes.c
647 index 791569f..54f4311 100644
648 --- a/tests/addrscopes.c
649 +++ b/tests/addrscopes.c
650 @@ -25,7 +25,7 @@
651 #include <stdio_ext.h>
652 #include <locale.h>
653 #include <stdlib.h>
654 -#include <error.h>
655 +#include <err.h>
656 #include <string.h>
657
658
659 diff --git a/tests/allregs.c b/tests/allregs.c
660 index 286f7e3..c9de089 100644
661 --- a/tests/allregs.c
662 +++ b/tests/allregs.c
663 @@ -21,7 +21,7 @@
664 #include <stdio.h>
665 #include <stdlib.h>
666 #include <string.h>
667 -#include <error.h>
668 +#include <err.h>
669 #include <locale.h>
670 #include <argp.h>
671 #include <assert.h>
672 diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c
673 index b7158da..354fa6a 100644
674 --- a/tests/backtrace-data.c
675 +++ b/tests/backtrace-data.c
676 @@ -27,7 +27,7 @@
677 #include <dirent.h>
678 #include <stdlib.h>
679 #include <errno.h>
680 -#include <error.h>
681 +#include <err.h>
682 #include <unistd.h>
683 #include <dwarf.h>
684 #if defined(__x86_64__) && defined(__linux__)
685 diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
686 index a644c8a..b8cbe27 100644
687 --- a/tests/backtrace-dwarf.c
688 +++ b/tests/backtrace-dwarf.c
689 @@ -22,7 +22,7 @@
690 #include <stdio_ext.h>
691 #include <locale.h>
692 #include <errno.h>
693 -#include <error.h>
694 +#include <err.h>
695 #include <unistd.h>
696 #include <sys/ptrace.h>
697 #include <sys/types.h>
698 diff --git a/tests/backtrace.c b/tests/backtrace.c
699 index 1ff6353..47e3f7b 100644
700 --- a/tests/backtrace.c
701 +++ b/tests/backtrace.c
702 @@ -24,7 +24,7 @@
703 #include <dirent.h>
704 #include <stdlib.h>
705 #include <errno.h>
706 -#include <error.h>
707 +#include <err.h>
708 #include <unistd.h>
709 #include <dwarf.h>
710 #ifdef __linux__
711 diff --git a/tests/buildid.c b/tests/buildid.c
712 index 87c1877..2953e6b 100644
713 --- a/tests/buildid.c
714 +++ b/tests/buildid.c
715 @@ -23,7 +23,7 @@
716 #include ELFUTILS_HEADER(elf)
717 #include ELFUTILS_HEADER(dwelf)
718 #include <stdio.h>
719 -#include <error.h>
720 +#include <err.h>
721 #include <string.h>
722 #include <stdlib.h>
723 #include <sys/types.h>
724 diff --git a/tests/debugaltlink.c b/tests/debugaltlink.c
725 index 6d97d50..ee7e559 100644
726 --- a/tests/debugaltlink.c
727 +++ b/tests/debugaltlink.c
728 @@ -23,7 +23,7 @@
729 #include ELFUTILS_HEADER(dw)
730 #include ELFUTILS_HEADER(dwelf)
731 #include <stdio.h>
732 -#include <error.h>
733 +#include <err.h>
734 #include <string.h>
735 #include <stdlib.h>
736 #include <sys/types.h>
737 diff --git a/tests/debuglink.c b/tests/debuglink.c
738 index 935d102..741cb81 100644
739 --- a/tests/debuglink.c
740 +++ b/tests/debuglink.c
741 @@ -21,7 +21,7 @@
742 #include <errno.h>
743 #include ELFUTILS_HEADER(dwelf)
744 #include <stdio.h>
745 -#include <error.h>
746 +#include <err.h>
747 #include <string.h>
748 #include <stdlib.h>
749 #include <sys/types.h>
750 diff --git a/tests/deleted.c b/tests/deleted.c
751 index 6be35bc..0190711 100644
752 --- a/tests/deleted.c
753 +++ b/tests/deleted.c
754 @@ -21,7 +21,7 @@
755 #include <unistd.h>
756 #include <assert.h>
757 #include <stdio.h>
758 -#include <error.h>
759 +#include <err.h>
760 #include <errno.h>
761 #ifdef __linux__
762 #include <sys/prctl.h>
763 diff --git a/tests/dwfl-addr-sect.c b/tests/dwfl-addr-sect.c
764 index 21e470a..1ea1e3b 100644
765 --- a/tests/dwfl-addr-sect.c
766 +++ b/tests/dwfl-addr-sect.c
767 @@ -23,7 +23,7 @@
768 #include <stdio_ext.h>
769 #include <stdlib.h>
770 #include <string.h>
771 -#include <error.h>
772 +#include <err.h>
773 #include <locale.h>
774 #include <argp.h>
775 #include ELFUTILS_HEADER(dwfl)
776 diff --git a/tests/dwfl-bug-addr-overflow.c b/tests/dwfl-bug-addr-overflow.c
777 index aa8030e..02c8bef 100644
778 --- a/tests/dwfl-bug-addr-overflow.c
779 +++ b/tests/dwfl-bug-addr-overflow.c
780 @@ -20,7 +20,7 @@
781 #include <inttypes.h>
782 #include <stdio.h>
783 #include <stdio_ext.h>
784 -#include <error.h>
785 +#include <err.h>
786 #include <locale.h>
787 #include ELFUTILS_HEADER(dwfl)
788
789 diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c
790 index 689cdd7..5973da3 100644
791 --- a/tests/dwfl-bug-fd-leak.c
792 +++ b/tests/dwfl-bug-fd-leak.c
793 @@ -24,7 +24,7 @@
794 #include <dirent.h>
795 #include <stdlib.h>
796 #include <errno.h>
797 -#include <error.h>
798 +#include <err.h>
799 #include <unistd.h>
800 #include <dwarf.h>
801
802 diff --git a/tests/dwfl-bug-getmodules.c b/tests/dwfl-bug-getmodules.c
803 index 1ee989f..fd62e65 100644
804 --- a/tests/dwfl-bug-getmodules.c
805 +++ b/tests/dwfl-bug-getmodules.c
806 @@ -18,7 +18,7 @@
807 #include <config.h>
808 #include ELFUTILS_HEADER(dwfl)
809
810 -#include <error.h>
811 +#include <err.h>
812
813 static const Dwfl_Callbacks callbacks =
814 {
815 diff --git a/tests/dwfl-report-elf-align.c b/tests/dwfl-report-elf-align.c
816 index a4e97d3..f471587 100644
817 --- a/tests/dwfl-report-elf-align.c
818 +++ b/tests/dwfl-report-elf-align.c
819 @@ -20,7 +20,7 @@
820 #include <inttypes.h>
821 #include <stdio.h>
822 #include <stdio_ext.h>
823 -#include <error.h>
824 +#include <err.h>
825 #include <locale.h>
826 #include <string.h>
827 #include <stdlib.h>
828 diff --git a/tests/dwfllines.c b/tests/dwfllines.c
829 index 90379dd..cbdf6c4 100644
830 --- a/tests/dwfllines.c
831 +++ b/tests/dwfllines.c
832 @@ -27,7 +27,7 @@
833 #include <stdio.h>
834 #include <stdlib.h>
835 #include <string.h>
836 -#include <error.h>
837 +#include <err.h>
838
839 int
840 main (int argc, char *argv[])
841 diff --git a/tests/dwflmodtest.c b/tests/dwflmodtest.c
842 index 0027f96..e68d3bc 100644
843 --- a/tests/dwflmodtest.c
844 +++ b/tests/dwflmodtest.c
845 @@ -23,7 +23,7 @@
846 #include <stdio_ext.h>
847 #include <stdlib.h>
848 #include <string.h>
849 -#include <error.h>
850 +#include <err.h>
851 #include <locale.h>
852 #include <argp.h>
853 #include ELFUTILS_HEADER(dwfl)
854 diff --git a/tests/dwflsyms.c b/tests/dwflsyms.c
855 index 49ac334..cf07830 100644
856 --- a/tests/dwflsyms.c
857 +++ b/tests/dwflsyms.c
858 @@ -25,7 +25,7 @@
859 #include <stdio.h>
860 #include <stdio_ext.h>
861 #include <stdlib.h>
862 -#include <error.h>
863 +#include <err.h>
864 #include <string.h>
865
866 static const char *
867 diff --git a/tests/early-offscn.c b/tests/early-offscn.c
868 index 924cb9e..6f60d5a 100644
869 --- a/tests/early-offscn.c
870 +++ b/tests/early-offscn.c
871 @@ -19,7 +19,7 @@
872 #endif
873
874 #include <errno.h>
875 -#include <error.h>
876 +#include <err.h>
877 #include <fcntl.h>
878 #include <gelf.h>
879 #include <stdio.h>
880 diff --git a/tests/ecp.c b/tests/ecp.c
881 index 38a6859..743cea5 100644
882 --- a/tests/ecp.c
883 +++ b/tests/ecp.c
884 @@ -20,7 +20,7 @@
885 #endif
886
887 #include <errno.h>
888 -#include <error.h>
889 +#include <err.h>
890 #include <fcntl.h>
891 #include <gelf.h>
892 #include <stdlib.h>
893 diff --git a/tests/find-prologues.c b/tests/find-prologues.c
894 index ba8ae37..76f5f04 100644
895 --- a/tests/find-prologues.c
896 +++ b/tests/find-prologues.c
897 @@ -25,7 +25,7 @@
898 #include <stdio_ext.h>
899 #include <locale.h>
900 #include <stdlib.h>
901 -#include <error.h>
902 +#include <err.h>
903 #include <string.h>
904 #include <fnmatch.h>
905
906 diff --git a/tests/funcretval.c b/tests/funcretval.c
907 index 8d19d11..c8aaa93 100644
908 --- a/tests/funcretval.c
909 +++ b/tests/funcretval.c
910 @@ -25,7 +25,7 @@
911 #include <stdio_ext.h>
912 #include <locale.h>
913 #include <stdlib.h>
914 -#include <error.h>
915 +#include <err.h>
916 #include <string.h>
917 #include <fnmatch.h>
918
919 diff --git a/tests/funcscopes.c b/tests/funcscopes.c
920 index 9c90185..dbccb89 100644
921 --- a/tests/funcscopes.c
922 +++ b/tests/funcscopes.c
923 @@ -25,7 +25,7 @@
924 #include <stdio_ext.h>
925 #include <locale.h>
926 #include <stdlib.h>
927 -#include <error.h>
928 +#include <err.h>
929 #include <string.h>
930 #include <fnmatch.h>
931
932 diff --git a/tests/getsrc_die.c b/tests/getsrc_die.c
933 index 055aede..9c394dd 100644
934 --- a/tests/getsrc_die.c
935 +++ b/tests/getsrc_die.c
936 @@ -19,7 +19,7 @@
937 #endif
938
939 #include <errno.h>
940 -#include <error.h>
941 +#include <err.h>
942 #include <fcntl.h>
943 #include <inttypes.h>
944 #include <libelf.h>
945 diff --git a/tests/line2addr.c b/tests/line2addr.c
946 index e0d65d3..9bf0023 100644
947 --- a/tests/line2addr.c
948 +++ b/tests/line2addr.c
949 @@ -26,7 +26,7 @@
950 #include <locale.h>
951 #include <stdlib.h>
952 #include <string.h>
953 -#include <error.h>
954 +#include <err.h>
955
956
957 static void
958 diff --git a/tests/low_high_pc.c b/tests/low_high_pc.c
959 index d0f4302..8da4fbd 100644
960 --- a/tests/low_high_pc.c
961 +++ b/tests/low_high_pc.c
962 @@ -25,7 +25,7 @@
963 #include <stdio_ext.h>
964 #include <locale.h>
965 #include <stdlib.h>
966 -#include <error.h>
967 +#include <err.h>
968 #include <string.h>
969 #include <fnmatch.h>
970
971 diff --git a/tests/md5-sha1-test.c b/tests/md5-sha1-test.c
972 index d50355e..3c41f40 100644
973 --- a/tests/md5-sha1-test.c
974 +++ b/tests/md5-sha1-test.c
975 @@ -19,7 +19,7 @@
976 #endif
977
978 #include <string.h>
979 -#include <error.h>
980 +#include <err.h>
981
982 #include "md5.h"
983 #include "sha1.h"
984 diff --git a/tests/rdwrmmap.c b/tests/rdwrmmap.c
985 index 6f027df..1ce5e6e 100644
986 --- a/tests/rdwrmmap.c
987 +++ b/tests/rdwrmmap.c
988 @@ -19,7 +19,7 @@
989 #endif
990
991 #include <errno.h>
992 -#include <error.h>
993 +#include <err.h>
994 #include <stdio.h>
995 #include <fcntl.h>
996 #include <unistd.h>
997 diff --git a/tests/saridx.c b/tests/saridx.c
998 index 8a450d8..b387801 100644
999 --- a/tests/saridx.c
1000 +++ b/tests/saridx.c
1001 @@ -17,7 +17,7 @@
1002
1003 #include <config.h>
1004
1005 -#include <error.h>
1006 +#include <err.h>
1007 #include <fcntl.h>
1008 #include <gelf.h>
1009 #include <stdio.h>
1010 diff --git a/tests/sectiondump.c b/tests/sectiondump.c
1011 index 3033fed..8e888db 100644
1012 --- a/tests/sectiondump.c
1013 +++ b/tests/sectiondump.c
1014 @@ -18,7 +18,7 @@
1015 #include <config.h>
1016
1017 #include <errno.h>
1018 -#include <error.h>
1019 +#include <err.h>
1020 #include <fcntl.h>
1021 #include <gelf.h>
1022 #include <inttypes.h>
1023 diff --git a/tests/varlocs.c b/tests/varlocs.c
1024 index c3fba89..e043ea2 100644
1025 --- a/tests/varlocs.c
1026 +++ b/tests/varlocs.c
1027 @@ -25,7 +25,7 @@
1028 #include <dwarf.h>
1029 #include <stdio.h>
1030 #include <stdlib.h>
1031 -#include <error.h>
1032 +#include <err.h>
1033 #include <string.h>
1034 #include <sys/types.h>
1035 #include <sys/stat.h>
1036 diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c
1037 index b876c10..afb2823 100644
1038 --- a/tests/vdsosyms.c
1039 +++ b/tests/vdsosyms.c
1040 @@ -18,7 +18,7 @@
1041 #include <config.h>
1042 #include <assert.h>
1043 #include <errno.h>
1044 -#include <error.h>
1045 +#include <err.h>
1046 #include <inttypes.h>
1047 #include <stdio.h>
1048 #include <string.h>
1049 --
1050 2.8.1
1051