Fresh pull from upstream
[librecmc/librecmc.git] / package / libs / elfutils / patches / 007-fix_TEMP_FAILURE_RETRY.patch
1 From b853c091231a56cc36135323d2668775a3d3c435 Mon Sep 17 00:00:00 2001
2 From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
3 Date: Thu, 29 Dec 2016 20:51:41 -0200
4 Subject: [PATCH] Fix TEMP_FAILURE_RETRY definition when not defined
5
6 https://sourceware.org/bugzilla/show_bug.cgi?id=21001
7
8 Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
9 ---
10  ChangeLog                        | 4 ++++
11  lib/crc32_file.c                 | 1 +
12  lib/system.h                     | 2 +-
13  libdwfl/dwfl_build_id_find_elf.c | 1 +
14  libdwfl/dwfl_module_getdwarf.c   | 1 +
15  libdwfl/libdwfl_crc32_file.c     | 1 -
16  6 files changed, 8 insertions(+), 2 deletions(-)
17
18 diff --git a/ChangeLog b/ChangeLog
19 index bb2ec10..77a7db8 100644
20 --- a/ChangeLog
21 +++ b/ChangeLog
22 @@ -1,3 +1,7 @@
23 +2016-12-29  Luiz Angelo Daros de Luca  <luizluca@gmail.com>
24 +
25 +       * Fix TEMP_FAILURE_RETRY definition when not defined
26 +
27  2016-12-27  Mark Wielaard  <mark@klomp.org>
28  
29         * configure.ac: Set version to 0.168.
30 diff --git a/lib/crc32_file.c b/lib/crc32_file.c
31 index a8434d4..57e4298 100644
32 --- a/lib/crc32_file.c
33 +++ b/lib/crc32_file.c
34 @@ -35,6 +35,7 @@
35  #include <unistd.h>
36  #include <sys/stat.h>
37  #include <sys/mman.h>
38 +#include "system.h"
39  
40  int
41  crc32_file (int fd, uint32_t *resp)
42 diff --git a/lib/system.h b/lib/system.h
43 index ccd99d6..dde7c4a 100644
44 --- a/lib/system.h
45 +++ b/lib/system.h
46 @@ -81,7 +81,7 @@
47       do \
48         __res = expression; \
49       while (__res == -1 && errno == EINTR); \
50 -     __res; });
51 +     __res; })
52  #endif
53  
54  static inline ssize_t __attribute__ ((unused))
55 diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c
56 index 903e193..d4737c9 100644
57 --- a/libdwfl/dwfl_build_id_find_elf.c
58 +++ b/libdwfl/dwfl_build_id_find_elf.c
59 @@ -30,6 +30,7 @@
60  #include <inttypes.h>
61  #include <fcntl.h>
62  #include <unistd.h>
63 +#include "system.h"
64  
65  
66  int
67 diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c
68 index 0e8810b..46caece 100644
69 --- a/libdwfl/dwfl_module_getdwarf.c
70 +++ b/libdwfl/dwfl_module_getdwarf.c
71 @@ -33,6 +33,7 @@
72  #include <unistd.h>
73  #include "../libdw/libdwP.h"   /* DWARF_E_* values are here.  */
74  #include "../libelf/libelfP.h"
75 +#include "system.h"
76  
77  static inline Dwfl_Error
78  open_elf_file (Elf **elf, int *fd, char **name)
79 diff --git a/libdwfl/libdwfl_crc32_file.c b/libdwfl/libdwfl_crc32_file.c
80 index 6b6b7d3..f849128 100644
81 --- a/libdwfl/libdwfl_crc32_file.c
82 +++ b/libdwfl/libdwfl_crc32_file.c
83 @@ -31,6 +31,5 @@
84  
85  #define crc32_file attribute_hidden __libdwfl_crc32_file
86  #define crc32 __libdwfl_crc32
87 -#define LIB_SYSTEM_H   1
88  #include <libdwflP.h>
89  #include "../lib/crc32_file.c"
90 -- 
91 2.9.3
92