mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 08:00:53 +00:00
compat: add TEMP_FAILURE_RETRY compatiable implementation
This commit is contained in:
@ -60,10 +60,19 @@
|
|||||||
# include <sys/sendfile.h>
|
# include <sys/sendfile.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.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 *
|
static inline void *
|
||||||
sysprof_malloc0 (size_t size)
|
sysprof_malloc0 (size_t size)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user