2
1

linux-2.6.28.10-unifdef-getline.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. From d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7 Mon Sep 17 00:00:00 2001
  2. From: Justin P. Mattock <justinmattock@gmail.com>
  3. Date: Sat, 7 Mar 2009 13:31:29 +0100
  4. Subject: [PATCH] kbuild: fix C libary confusion in unifdef.c due to getline()
  5. This fixes an error when compiling the kernel.
  6. CHK include/linux/version.h
  7. HOSTCC scripts/unifdef
  8. scripts/unifdef.c:209: error: conflicting types for 'getline'
  9. /usr/include/stdio.h:651: note: previous declaration of 'getline' was here
  10. make[1]: *** [scripts/unifdef] Error 1
  11. make: *** [__headers] Error 2
  12. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
  13. Cc: Frederic Weisbecker <fweisbec@gmail.com>
  14. Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  15. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
  16. ---
  17. scripts/unifdef.c | 6 +++---
  18. 1 files changed, 3 insertions(+), 3 deletions(-)
  19. diff --git a/scripts/unifdef.c b/scripts/unifdef.c
  20. index 552025e..05a31a6 100644
  21. --- a/scripts/unifdef.c
  22. +++ b/scripts/unifdef.c
  23. @@ -206,7 +206,7 @@ static void done(void);
  24. static void error(const char *);
  25. static int findsym(const char *);
  26. static void flushline(bool);
  27. -static Linetype getline(void);
  28. +static Linetype get_line(void);
  29. static Linetype ifeval(const char **);
  30. static void ignoreoff(void);
  31. static void ignoreon(void);
  32. @@ -512,7 +512,7 @@ process(void)
  33. for (;;) {
  34. linenum++;
  35. - lineval = getline();
  36. + lineval = get_line();
  37. trans_table[ifstate[depth]][lineval]();
  38. debug("process %s -> %s depth %d",
  39. linetype_name[lineval],
  40. @@ -526,7 +526,7 @@ process(void)
  41. * help from skipcomment().
  42. */
  43. static Linetype
  44. -getline(void)
  45. +get_line(void)
  46. {
  47. const char *cp;
  48. int cursym;
  49. --
  50. 1.6.3.3