mbim: add an optional TEMP_FAILURE_RETRY macro copy
PATCH 1/1 mbim: add an optional TEMP_FAILURE_RETRY macro copy
Fixes build on musl which does not provide this macro
Signed-off-by Khem Raj <[email protected]>
--- drivers/mbimmodem/mbim-private.h | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/mbimmodem/mbim-private.h +9 -0
@@ -21,6 +21,15 @@#define align_len (len, boundary) (((len)+(boundary)-1) & ~((boundary)-1)) +#ifndef TEMP_FAILURE_RETRY +#define TEMP_FAILURE_RETRY (expression) ({ \ + __typeof(expression) __result; \ + do { \ + __result = (expression); \ + } while (__result == -1 && errno == EINTR); \ + __result; }) +#endif +enum mbim_control_message {MBIM_OPEN_MSG =0x1 ,MBIM_CLOSE_MSG =0x2 ,
Signature · 1 line
2.21.0
Hi,
Quoted 3 lines · Khem Raj
Fixes build on musl which does not provide this macro
Signed-off-by Khem Raj <[email protected]>
No Signed-off-by for oFono patch submissions please
Quoted 4 lines
--- drivers/mbimmodem/mbim-private.h | 9 +++++++++ 1 file changed, 9 insertions(+)
I solved this by introducing L_TFR in ell, commit:8198b3689490eb81fdc7ce42f4ec1ac7321a1e3c
And reworked all use of TFR/TEMP_FAILURE_RETRY to use that instead.
Regards,
-Denis