mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
4.1 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/modutils/gcc40.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. GCC 4.0.2 complains about
  20. depmod.c, insmod.c, obj_kallsyms.c: invalid lvalue in assignment
  21. genksyms.c: static declaration of error follows non-static declaration,
  22. previous declaration in ../include/util.h
  23. Stefan Fiedler
  24. diff -dur modutils-2.4.27/depmod/depmod.c src.modutils.1129663106.24148.1818346198/modutils-2.4.27/depmod/depmod.c
  25. --- modutils-2.4.27/depmod/depmod.c 2003-03-23 03:34:28.000000000 +0100
  26. +++ src.modutils.1129663106.24148.1818346198/modutils-2.4.27/depmod/depmod.c 2005-10-18 21:44:54.000000000 +0200
  27. @@ -1132,8 +1132,10 @@
  28. return -1;
  29. for (ksym = ksyms; so_far < nksyms; ++so_far, ksym++) {
  30. - if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0)
  31. - ((char *)ksym->name) += 8;
  32. + if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0) {
  33. + char *charptr = ((char *)ksym->name) + 8;
  34. + ksym->name = charptr;
  35. + };
  36. assert(n_syms < MAX_MAP_SYM);
  37. symtab[n_syms++] = addsym((char *)ksym->name, mod, SYM_DEFINED, 0);
  38. }
  39. diff -dur modutils-2.4.27/genksyms/genksyms.c src.modutils.1129663106.24148.1818346198/modutils-2.4.27/genksyms/genksyms.c
  40. --- modutils-2.4.27/genksyms/genksyms.c 2002-03-01 01:39:06.000000000 +0100
  41. +++ src.modutils.1129663106.24148.1818346198/modutils-2.4.27/genksyms/genksyms.c 2005-10-18 21:41:47.000000000 +0200
  42. @@ -45,7 +45,7 @@
  43. int flag_debug, flag_dump_defs, flag_warnings;
  44. int checksum_version = 1, kernel_version = version(2,0,0);
  45. -static int errors;
  46. +int errors;
  47. static int nsyms;
  48. static struct symbol *expansion_trail;
  49. diff -dur modutils-2.4.27/insmod/insmod.c src.modutils.1129663106.24148.1818346198/modutils-2.4.27/insmod/insmod.c
  50. --- modutils-2.4.27/insmod/insmod.c 2003-10-27 03:34:46.000000000 +0100
  51. +++ src.modutils.1129663106.24148.1818346198/modutils-2.4.27/insmod/insmod.c 2005-10-18 21:44:14.000000000 +0200
  52. @@ -274,8 +274,10 @@
  53. */
  54. if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) {
  55. gplonly_seen = 1;
  56. - if (gpl)
  57. - ((char *)s->name) += 8;
  58. + if (gpl) {
  59. + char *charptr = ((char *)s->name) + 8;
  60. + s->name = charptr;
  61. + }
  62. else
  63. continue;
  64. }
  65. diff -dur modutils-2.4.27/obj/obj_kallsyms.c src.modutils.1129663106.24148.1818346198/modutils-2.4.27/obj/obj_kallsyms.c
  66. --- modutils-2.4.27/obj/obj_kallsyms.c 2002-03-01 01:39:06.000000000 +0100
  67. +++ src.modutils.1129663106.24148.1818346198/modutils-2.4.27/obj/obj_kallsyms.c 2005-10-18 21:24:22.000000000 +0200
  68. @@ -200,8 +200,9 @@
  69. /* Initial contents, header + one entry per input section. No strings. */
  70. osec->header.sh_size = sizeof(*a_hdr) + loaded*sizeof(*a_sec);
  71. - a_hdr = (struct kallsyms_header *) osec->contents =
  72. - xmalloc(osec->header.sh_size);
  73. + osec->contents = xmalloc(osec->header.sh_size);
  74. + a_hdr = (struct kallsyms_header *) osec->contents;
  75. +
  76. memset(osec->contents, 0, osec->header.sh_size);
  77. a_hdr->size = sizeof(*a_hdr);
  78. a_hdr->sections = loaded;
  79. @@ -275,8 +276,8 @@
  80. a_hdr->symbol_off +
  81. a_hdr->symbols*a_hdr->symbol_size +
  82. strings_size - strings_left;
  83. - a_hdr = (struct kallsyms_header *) osec->contents =
  84. - xrealloc(a_hdr, a_hdr->total_size);
  85. + osec->contents = xrealloc(a_hdr, a_hdr->total_size);
  86. + a_hdr = (struct kallsyms_header *) osec->contents;
  87. p = (char *)a_hdr + a_hdr->symbol_off;
  88. memcpy(p, symbols, a_hdr->symbols*a_hdr->symbol_size);
  89. free(symbols);