diff options
Diffstat (limited to 'meta/recipes-support/gnutls/gnutls-2.12.19/correct_rpl_gettimeofday_signature.patch')
-rw-r--r-- | meta/recipes-support/gnutls/gnutls-2.12.19/correct_rpl_gettimeofday_signature.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-support/gnutls/gnutls-2.12.19/correct_rpl_gettimeofday_signature.patch b/meta/recipes-support/gnutls/gnutls-2.12.19/correct_rpl_gettimeofday_signature.patch new file mode 100644 index 0000000000..b8f0d727ab --- /dev/null +++ b/meta/recipes-support/gnutls/gnutls-2.12.19/correct_rpl_gettimeofday_signature.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | Currently we fail on uclibc like below | ||
2 | |||
3 | | In file included from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/procfs.h:32:0, | ||
4 | | from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/ucontext.h:26, | ||
5 | | from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/signal.h:392, | ||
6 | | from ../../gl/signal.h:52, | ||
7 | | from ../../gl/sys/select.h:58, | ||
8 | | from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/types.h:220, | ||
9 | | from ../../gl/sys/types.h:28, | ||
10 | | from ../../lib/includes/gnutls/gnutls.h:46, | ||
11 | | from ex-cxx.cpp:3: | ||
12 | | ../../gl/sys/time.h:396:66: error: conflicting declaration 'void* restrict' | ||
13 | | ../../gl/sys/time.h:396:50: error: 'restrict' has a previous declaration as 'timeval* restrict' | ||
14 | | make[4]: *** [ex-cxx.o] Error 1 | ||
15 | | make[4]: *** Waiting for unfinished jobs.... | ||
16 | |||
17 | |||
18 | GCC detects that we call 'restrict' as param name in function | ||
19 | signatures and complains since both params are called 'restrict' | ||
20 | therefore we use __restrict to denote the C99 keywork | ||
21 | |||
22 | This only happens of uclibc since this code is not excercised with | ||
23 | eglibc otherwise we will have same issue there too | ||
24 | |||
25 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
26 | |||
27 | Upstream-Status: Pending | ||
28 | |||
29 | Index: gnutls-2.12.14/gl/sys_time.in.h | ||
30 | =================================================================== | ||
31 | --- gnutls-2.12.14.orig/gl/sys_time.in.h 2012-01-15 10:54:39.517285351 -0800 | ||
32 | +++ gnutls-2.12.14/gl/sys_time.in.h 2012-01-15 10:59:23.773299108 -0800 | ||
33 | @@ -82,20 +82,20 @@ | ||
34 | # define gettimeofday rpl_gettimeofday | ||
35 | # endif | ||
36 | _GL_FUNCDECL_RPL (gettimeofday, int, | ||
37 | - (struct timeval *restrict, void *restrict) | ||
38 | + (struct timeval *__restrict, void *__restrict) | ||
39 | _GL_ARG_NONNULL ((1))); | ||
40 | _GL_CXXALIAS_RPL (gettimeofday, int, | ||
41 | - (struct timeval *restrict, void *restrict)); | ||
42 | + (struct timeval *__restrict, void *__restrict)); | ||
43 | # else | ||
44 | # if !@HAVE_GETTIMEOFDAY@ | ||
45 | _GL_FUNCDECL_SYS (gettimeofday, int, | ||
46 | - (struct timeval *restrict, void *restrict) | ||
47 | + (struct timeval *__restrict, void *__restrict) | ||
48 | _GL_ARG_NONNULL ((1))); | ||
49 | # endif | ||
50 | /* Need to cast, because on glibc systems, by default, the second argument is | ||
51 | struct timezone *. */ | ||
52 | _GL_CXXALIAS_SYS_CAST (gettimeofday, int, | ||
53 | - (struct timeval *restrict, void *restrict)); | ||
54 | + (struct timeval *__restrict, void *__restrict)); | ||
55 | # endif | ||
56 | _GL_CXXALIASWARN (gettimeofday); | ||
57 | # elif defined GNULIB_POSIXCHECK | ||