Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge branch 'jb49555_musl_fixes' into 'master'
Fix issues from arising from musl libc compatibility See merge request mer-core/dsme!42
- Loading branch information
Showing
11 changed files
with
55 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,28 @@ | ||
/* Used to retry syscalls that can return EINTR. Taken from bionic unistd.h */ | ||
#ifndef TEMP_FAILURE_RETRY | ||
#define TEMP_FAILURE_RETRY(exp) ({ \ | ||
#ifndef DSME_MUSL_COMPATIBILITY_H_ | ||
# define DSME_MUSL_COMPATIBILITY_H_ | ||
|
||
/* Whether __GLIBC__ gets defined when compiling against gnu libc, | ||
* depends on what - if any - libc header files have been included | ||
* so far. To be sure, include features.h that contains the define. | ||
*/ | ||
# include <features.h> | ||
|
||
/* Define equivalents for glibc macros that dsme sources are using, | ||
* but are not defined in musl libc headers. | ||
*/ | ||
# ifndef __GLIBC__ | ||
|
||
/* Used to retry syscalls that can return EINTR. Taken from bionic unistd.h | ||
*/ | ||
# ifndef TEMP_FAILURE_RETRY | ||
# define TEMP_FAILURE_RETRY(exp) ({ \ | ||
__typeof__(exp) _rc; \ | ||
do { \ | ||
_rc = (exp); \ | ||
} while (_rc == -1 && errno == EINTR); \ | ||
_rc; }) | ||
#endif | ||
# endif | ||
|
||
# endif /* not __GLIBC__ */ | ||
|
||
#endif /* DSME_MUSL_COMPATIBILITY_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters