From 2cc382a91d4d252244ce6a5035932aab085b9b3f Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 29 Sep 2022 12:06:43 -0700 Subject: The TEMP_FAILURE_RETRY macro should be everywhere. --- src/compat/linux.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/compat/linux.h b/src/compat/linux.h index 744c506..3b8cb44 100644 --- a/src/compat/linux.h +++ b/src/compat/linux.h @@ -28,4 +28,13 @@ #define bu_gai_strerror gai_strerror +#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 + #endif -- cgit v1.2.3