diff --git a/src/libsysprof-capture/sysprof-capture-util-private.h b/src/libsysprof-capture/sysprof-capture-util-private.h index 13ec1eed..6181212c 100644 --- a/src/libsysprof-capture/sysprof-capture-util-private.h +++ b/src/libsysprof-capture/sysprof-capture-util-private.h @@ -60,10 +60,19 @@ # include #endif +#include #include #include #include +#ifndef TEMP_FAILURE_RETRY +#define TEMP_FAILURE_RETRY(expression) \ + ({ long int __result; \ + do { __result = (long int) (expression); } \ + while (__result == -1L && errno == EINTR); \ + __result; }) +#endif + static inline void * sysprof_malloc0 (size_t size) {