diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2017-02-20 12:57:36 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2017-02-20 12:57:36 +0000 |
commit | 704dab2aae9f981fe36c0cbe7ba09a3a09880877 (patch) | |
tree | 1c33349df4fcb22da510cf0a825c026af2a102c6 /main/v4l-utils/0001-ir-ctl-fixes-for-musl-compile.patch | |
parent | e6de48d4857379d7e1d83c13a661503dd47fda0a (diff) | |
download | aports-704dab2aae9f981fe36c0cbe7ba09a3a09880877.tar.bz2 aports-704dab2aae9f981fe36c0cbe7ba09a3a09880877.tar.xz |
main/v4l-utils: upgrade to 1.12.3
Diffstat (limited to 'main/v4l-utils/0001-ir-ctl-fixes-for-musl-compile.patch')
-rw-r--r-- | main/v4l-utils/0001-ir-ctl-fixes-for-musl-compile.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/main/v4l-utils/0001-ir-ctl-fixes-for-musl-compile.patch b/main/v4l-utils/0001-ir-ctl-fixes-for-musl-compile.patch new file mode 100644 index 0000000000..5391d815b5 --- /dev/null +++ b/main/v4l-utils/0001-ir-ctl-fixes-for-musl-compile.patch @@ -0,0 +1,37 @@ +diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c +index bc58cee..1a44011 100644 +--- a/utils/ir-ctl/ir-ctl.c ++++ b/utils/ir-ctl/ir-ctl.c +@@ -42,6 +42,16 @@ + # define _(string) string + #endif + ++/* taken from glibc unistd.h */ ++#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 N_(string) string + + +@@ -344,12 +354,14 @@ static struct file *read_scancode(const char *name) + return NULL; + } + +- pstr = strndupa(name, p - name); ++ pstr = strndup(name, p - name); + + if (!protocol_match(pstr, &proto)) { + fprintf(stderr, _("error: protocol '%s' not found\n"), pstr); ++ free(pstr); + return NULL; + } ++ free(pstr); + + if (!strtoscancode(p + 1, &scancode)) { + fprintf(stderr, _("error: invalid scancode '%s'\n"), p + 1); |