mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
compat: add TEMP_FAILURE_RETRY compatiable implementation
This commit is contained in:
@ -60,10 +60,19 @@
|
||||
# include <sys/sendfile.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user