Skip to content
Snippets Groups Projects
Commit 15c06468 authored by Colin Walters's avatar Colin Walters
Browse files

Merge branch 'us-temp-failure-retry' into 'master'

macros: Add TEMP_FAILURE_RETRY for musl

See merge request GNOME/libglnx!9
parents 8f34033b 460400c1
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,16 @@ G_BEGIN_DECLS ...@@ -31,6 +31,16 @@ G_BEGIN_DECLS
/* All of these are for C only. */ /* All of these are for C only. */
#ifndef __GI_SCANNER__ #ifndef __GI_SCANNER__
/* fixes builds against musl, taken from glibc unistd.h */
#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
/* Taken from https://github.com/systemd/systemd/src/basic/string-util.h /* Taken from https://github.com/systemd/systemd/src/basic/string-util.h
* at revision v228-666-gcf6c8c4 * at revision v228-666-gcf6c8c4
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment