mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
musl: Add TEMP_FAILURE_RETRY from glibc
Patch it into musl instead of patching all users (currently elfutils and next ofono). (From OE-Core rev: 0c68c621d3b8690e3a346170006f75b032511a8a) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
f91866aaf1
commit
11fd8dc6ff
@@ -0,0 +1,36 @@
|
|||||||
|
From 19cbebc3fa33c6a1a71a6036da4d67c98f859f06 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adrian Bunk <bunk@stusta.de>
|
||||||
|
Date: Wed, 15 May 2019 16:08:33 +0300
|
||||||
|
Subject: unistd.h: Add TEMP_FAILURE_RETRY
|
||||||
|
|
||||||
|
Signed-off-by: Adrian Bunk <bunk@stusta.de>
|
||||||
|
Upstream-Status: Inappropriate [oe-specific]
|
||||||
|
---
|
||||||
|
include/unistd.h | 11 +++++++++++
|
||||||
|
1 file changed, 11 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/include/unistd.h b/include/unistd.h
|
||||||
|
index 9485da7a..8a75af57 100644
|
||||||
|
--- a/include/unistd.h
|
||||||
|
+++ b/include/unistd.h
|
||||||
|
@@ -460,6 +460,17 @@ int eaccess(const char *, int);
|
||||||
|
#define _CS_V6_ENV 1148
|
||||||
|
#define _CS_V7_ENV 1149
|
||||||
|
|
||||||
|
+#ifdef _GNU_SOURCE
|
||||||
|
+#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
|
||||||
|
+
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
@@ -15,6 +15,7 @@ PV = "${BASEVER}+git${SRCPV}"
|
|||||||
SRC_URI = "git://git.musl-libc.org/musl \
|
SRC_URI = "git://git.musl-libc.org/musl \
|
||||||
file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
|
file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
|
||||||
file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
|
file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
|
||||||
|
file://0001-unistd.h-Add-TEMP_FAILURE_RETRY.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|||||||
+1
-29
@@ -64,18 +64,10 @@ index 292082b..308a762 100644
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@@ -51,6 +51,16 @@
|
@@ -51,6 +51,8 @@
|
||||||
#else
|
#else
|
||||||
# error "Unknown byte order"
|
# error "Unknown byte order"
|
||||||
#endif
|
#endif
|
||||||
+#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
|
|
||||||
+
|
+
|
||||||
+#define error(status, errno, ...) err(status, __VA_ARGS__)
|
+#define error(status, errno, ...) err(status, __VA_ARGS__)
|
||||||
|
|
||||||
@@ -141,26 +133,6 @@ index 56e6105..f4a0649 100644
|
|||||||
#include "../libdw/libdwP.h" /* DWARF_E_* values are here. */
|
#include "../libdw/libdwP.h" /* DWARF_E_* values are here. */
|
||||||
#include "../libelf/libelfP.h"
|
#include "../libelf/libelfP.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
diff --git a/libdwfl/libdwfl_crc32_file.c b/libdwfl/libdwfl_crc32_file.c
|
|
||||||
index f849128..6f0aca1 100644
|
|
||||||
--- a/libdwfl/libdwfl_crc32_file.c
|
|
||||||
+++ b/libdwfl/libdwfl_crc32_file.c
|
|
||||||
@@ -29,6 +29,15 @@
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#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
|
|
||||||
+
|
|
||||||
#define crc32_file attribute_hidden __libdwfl_crc32_file
|
|
||||||
#define crc32 __libdwfl_crc32
|
|
||||||
#include <libdwflP.h>
|
|
||||||
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
|
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
|
||||||
index 360e4ee..b5aa397 100644
|
index 360e4ee..b5aa397 100644
|
||||||
--- a/libdwfl/linux-kernel-modules.c
|
--- a/libdwfl/linux-kernel-modules.c
|
||||||
|
|||||||
Reference in New Issue
Block a user