diff options
author | Peter Korsgaard <peter@korsgaard.com> | 2018-09-07 13:08:31 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2018-09-07 13:13:17 +0200 |
commit | 721e4cbb529d247c9c1ebef68275e70a3086ae0b (patch) | |
tree | 2967ef4e10e2592661f664df4515d67dbc80cfe5 /package/kmod/0002-shared-util.c-assert_cc-can-only-be-used-inside-func.patch | |
parent | 89920e9735cb561dccf1e1f81d35788fd10a655b (diff) | |
parent | cec266ee1f708f11cc679cb4f81613fa4186003c (diff) | |
download | buildroot-721e4cbb529d247c9c1ebef68275e70a3086ae0b.tar.gz buildroot-721e4cbb529d247c9c1ebef68275e70a3086ae0b.zip |
Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/kmod/0002-shared-util.c-assert_cc-can-only-be-used-inside-func.patch')
-rw-r--r-- | package/kmod/0002-shared-util.c-assert_cc-can-only-be-used-inside-func.patch | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/package/kmod/0002-shared-util.c-assert_cc-can-only-be-used-inside-func.patch b/package/kmod/0002-shared-util.c-assert_cc-can-only-be-used-inside-func.patch deleted file mode 100644 index 09fe252420..0000000000 --- a/package/kmod/0002-shared-util.c-assert_cc-can-only-be-used-inside-func.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 7cd698eb31059012305d8bb7516577c8cd383e32 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> -Date: Sat, 3 Jun 2017 16:52:37 +0200 -Subject: [PATCH] shared/util.c: assert_cc() can only be used inside functions - -shared/macro.h has two versions of assert_cc, one that uses gcc -_Static_assert(), which requires recent enough gcc versions, and one -that uses a fake array to trigger a build error. The latter can only -work inside functions, so assert_cc() should only be used inside -functions. - -Fixes the following build failure when building kmod with old gcc -versions such as gcc 4.3.x: - -shared/util.c:52: error: expected identifier or '(' before 'do' -shared/util.c:52: error: expected identifier or '(' before 'while' - -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---- - shared/util.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/shared/util.c b/shared/util.c -index 9de080a..fd2028d 100644 ---- a/shared/util.c -+++ b/shared/util.c -@@ -49,8 +49,6 @@ static const struct kmod_ext { - { } - }; - --assert_cc(EAGAIN == EWOULDBLOCK); -- - /* string handling functions and memory allocations */ - /* ************************************************************************ */ - -@@ -201,6 +199,8 @@ ssize_t read_str_safe(int fd, char *buf, size_t buflen) - size_t todo = buflen - 1; - size_t done = 0; - -+ assert_cc(EAGAIN == EWOULDBLOCK); -+ - do { - ssize_t r = read(fd, buf + done, todo); - -@@ -226,6 +226,8 @@ ssize_t write_str_safe(int fd, const char *buf, size_t buflen) - size_t todo = buflen; - size_t done = 0; - -+ assert_cc(EAGAIN == EWOULDBLOCK); -+ - do { - ssize_t r = write(fd, buf + done, todo); - --- -2.7.4 - |