summaryrefslogtreecommitdiff
blob: cff8347a212a1b9ef55ccf3eee757e709900cb7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Bug: https://bugs.gentoo.org/894550
--- a/hddled.c
+++ b/hddled.c
@@ -43,6 +43,15 @@
 
 #define PACKAGE_STRING    "hddled 0.3"
 #define PACKAGE_BUGREPORT "hddled@very.puzzling.org"
+/* taken from glibc unistd.h and fixes musl */
+#ifndef TEMP_FAILURE_RETRY
+#define TEMP_FAILURE_RETRY(expression) \
+  (__extension__                                                              \
+    ({ long int __result;                                                     \
+       do __result = (long int) (expression);                                 \
+       while (__result == -1L && errno == EINTR);                             \
+       __result; }))
+#endif
 
 #define VMSTAT "/proc/vmstat"