You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

129 lines
3.4 KiB

  1. Index: acpid-2.0.23/tempfailure.h
  2. ===================================================================
  3. --- /dev/null
  4. +++ acpid-2.0.23/tempfailure.h
  5. @@ -0,0 +1,8 @@
  6. +#ifndef TEMP_FAILURE_RETRY
  7. +#define TEMP_FAILURE_RETRY(expression) \
  8. + (__extension__ \
  9. + ({ long int __result; \
  10. + do __result = (long int) (expression); \
  11. + while (__result == -1L && errno == EINTR); \
  12. + __result; }))
  13. +#endif
  14. Index: acpid-2.0.23/acpi_listen.c
  15. ===================================================================
  16. --- acpid-2.0.23.orig/acpi_listen.c
  17. +++ acpid-2.0.23/acpi_listen.c
  18. @@ -39,6 +39,8 @@
  19. #include "acpid.h"
  20. #include "ud_socket.h"
  21. +#include "tempfailure.h"
  22. +
  23. static int handle_cmdline(int *argc, char ***argv);
  24. static char *read_line(int fd);
  25. Index: acpid-2.0.23/acpid.c
  26. ===================================================================
  27. --- acpid-2.0.23.orig/acpid.c
  28. +++ acpid-2.0.23/acpid.c
  29. @@ -41,6 +41,7 @@
  30. #include "input_layer.h"
  31. #include "inotify_handler.h"
  32. #include "netlink.h"
  33. +#include "tempfailure.h"
  34. static int handle_cmdline(int *argc, char ***argv);
  35. static void close_fds(void);
  36. Index: acpid-2.0.23/event.c
  37. ===================================================================
  38. --- acpid-2.0.23.orig/event.c
  39. +++ acpid-2.0.23/event.c
  40. @@ -40,6 +40,9 @@
  41. #include "sock.h"
  42. #include "ud_socket.h"
  43. #include "event.h"
  44. +
  45. +#include "tempfailure.h"
  46. +
  47. /*
  48. * What is a rule? It's polymorphic, pretty much.
  49. */
  50. Index: acpid-2.0.23/input_layer.c
  51. ===================================================================
  52. --- acpid-2.0.23.orig/input_layer.c
  53. +++ acpid-2.0.23/input_layer.c
  54. @@ -47,6 +47,8 @@
  55. #define DIM(a) (sizeof(a) / sizeof(a[0]))
  56. +#include "tempfailure.h"
  57. +
  58. struct evtab_entry {
  59. struct input_event event;
  60. const char *str;
  61. Index: acpid-2.0.23/kacpimon/libnetlink.c
  62. ===================================================================
  63. --- acpid-2.0.23.orig/kacpimon/libnetlink.c
  64. +++ acpid-2.0.23/kacpimon/libnetlink.c
  65. @@ -26,6 +26,8 @@
  66. #include "libnetlink.h"
  67. +#include "../tempfailure.h"
  68. +
  69. void rtnl_close(struct rtnl_handle *rth)
  70. {
  71. if (rth->fd >= 0) {
  72. Index: acpid-2.0.23/netlink.c
  73. ===================================================================
  74. --- acpid-2.0.23.orig/netlink.c
  75. +++ acpid-2.0.23/netlink.c
  76. @@ -46,6 +46,7 @@
  77. #include "connection_list.h"
  78. #include "netlink.h"
  79. +#include "tempfailure.h"
  80. static void
  81. format_netlink(struct nlmsghdr *msg)
  82. Index: acpid-2.0.23/proc.c
  83. ===================================================================
  84. --- acpid-2.0.23.orig/proc.c
  85. +++ acpid-2.0.23/proc.c
  86. @@ -34,6 +34,8 @@
  87. #include "proc.h"
  88. +#include "tempfailure.h"
  89. +
  90. const char *eventfile = ACPID_EVENTFILE;
  91. static char *read_line(int fd);
  92. Index: acpid-2.0.23/ud_socket.c
  93. ===================================================================
  94. --- acpid-2.0.23.orig/ud_socket.c
  95. +++ acpid-2.0.23/ud_socket.c
  96. @@ -22,6 +22,8 @@
  97. #include "log.h"
  98. #include "ud_socket.h"
  99. +#include "tempfailure.h"
  100. +
  101. int
  102. ud_create_socket(const char *name, mode_t socketmode)
  103. {
  104. Index: acpid-2.0.23/libnetlink.c
  105. ===================================================================
  106. --- acpid-2.0.23.orig/libnetlink.c
  107. +++ acpid-2.0.23/libnetlink.c
  108. @@ -26,6 +26,8 @@
  109. #include "libnetlink.h"
  110. +#include "tempfailure.h"
  111. +
  112. void rtnl_close(struct rtnl_handle *rth)
  113. {
  114. if (rth->fd >= 0) {