All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ell: fix build with musl libc
@ 2018-04-05 14:54 maxin.john
  2018-04-06 15:29 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: maxin.john @ 2018-04-05 14:54 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 842 bytes --]

From: "Maxin B. John" <maxin.john@intel.com>

musl libc doesn't implement TEMP_FAILURE_RETRY. Use the
TEMP_FAILURE_RETRY from glibc to fix build.
---
 ell/dbus.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/ell/dbus.h b/ell/dbus.h
index a7c08d2..3ff5e0f 100644
--- a/ell/dbus.h
+++ b/ell/dbus.h
@@ -28,6 +28,16 @@
 #include <stddef.h>
 #include <stdarg.h>
 
+/* taken from glibc unistd.h for musl support */
+#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
+
 #ifdef __cplusplus
 extern "C" {
 #endif
-- 
2.4.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ell: fix build with musl libc
  2018-04-05 14:54 [PATCH] ell: fix build with musl libc maxin.john
@ 2018-04-06 15:29 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2018-04-06 15:29 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]

Hi Maxin,

On 04/05/2018 09:54 AM, maxin.john(a)gmail.com wrote:
> From: "Maxin B. John" <maxin.john@intel.com>
> 
> musl libc doesn't implement TEMP_FAILURE_RETRY. Use the
> TEMP_FAILURE_RETRY from glibc to fix build.
> ---
>   ell/dbus.h | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 

Applied, thanks.

Regards,
-Denis


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-06 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-05 14:54 [PATCH] ell: fix build with musl libc maxin.john
2018-04-06 15:29 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.