On Mon, 28 Jan 2019 13:34:37 +0100 Marcel Holtmann <marcel(a)holtmann.org> wrote:
Hi Marcel,
Hi Nicolas,
> TEMP_FAILURE_RETRY is not available on musl.
>
> Signed-off-by: Nicolas Serafini <nicolas.serafini(a)sensefly.com>
> ---
> drivers/mbimmodem/mbim.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/mbimmodem/mbim.c b/drivers/mbimmodem/mbim.c
> index 54b18acf..4b040528 100644
> --- a/drivers/mbimmodem/mbim.c
> +++ b/drivers/mbimmodem/mbim.c
> @@ -37,6 +37,16 @@
> #include "mbim-message.h"
> #include "mbim-private.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
> +
or you use the notation that is used in src/storage.h and maybe even
move it to a more common place. The TFR macro is used in various
places.
Yes it's a good idea, what do you think about putting it in the
"include/types.h" file.
Regards
Marcel
Regards
Nicolas