007-fix_TEMP_FAILURE_RETRY.patch 2.6 KB

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