0006-resolve-restrict-keyword-conflict.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 0ce96011d76ffa377349d0193dd0bf8f1bf641e0 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Tue, 10 May 2016 08:47:05 -0700
  4. Subject: [PATCH] resolve restrict keyword conflict
  5. GCC detects that we call 'restrict' as param name in function
  6. signatures and complains since both params are called 'restrict'
  7. therefore we use __restrict to denote the C99 keywork
  8. Upstream-Status: Pending
  9. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  10. ---
  11. gnulib/import/sys_time.in.h | 8 ++++----
  12. 1 file changed, 4 insertions(+), 4 deletions(-)
  13. diff --git a/gnulib/import/sys_time.in.h b/gnulib/import/sys_time.in.h
  14. index 87db1a88745..e6b98c7e467 100644
  15. --- a/gnulib/import/sys_time.in.h
  16. +++ b/gnulib/import/sys_time.in.h
  17. @@ -93,20 +93,20 @@ struct timeval
  18. # define gettimeofday rpl_gettimeofday
  19. # endif
  20. _GL_FUNCDECL_RPL (gettimeofday, int,
  21. - (struct timeval *restrict, void *restrict)
  22. + (struct timeval *__restrict, void *__restrict)
  23. _GL_ARG_NONNULL ((1)));
  24. _GL_CXXALIAS_RPL (gettimeofday, int,
  25. - (struct timeval *restrict, void *restrict));
  26. + (struct timeval *__restrict, void *__restrict));
  27. # else
  28. # if !@HAVE_GETTIMEOFDAY@
  29. _GL_FUNCDECL_SYS (gettimeofday, int,
  30. - (struct timeval *restrict, void *restrict)
  31. + (struct timeval *__restrict, void *__restrict)
  32. _GL_ARG_NONNULL ((1)));
  33. # endif
  34. /* Need to cast, because on glibc systems, by default, the second argument is
  35. struct timezone *. */
  36. _GL_CXXALIAS_SYS_CAST (gettimeofday, int,
  37. - (struct timeval *restrict, void *restrict));
  38. + (struct timeval *__restrict, void *__restrict));
  39. # endif
  40. _GL_CXXALIASWARN (gettimeofday);
  41. # if defined __cplusplus && defined GNULIB_NAMESPACE