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.

129 lines
4.3 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/ntp/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. patch for ntp_config.c seems to be a workaround for a bug in GCC 4.0.2 o_O
  20. - stf
  21. diff -dur ntp-4.2.0/include/ntpd.h src.ntp.1129999861.8262.1253845312/ntp-4.2.0/include/ntpd.h
  22. --- ntp-4.2.0/include/ntpd.h 2003-09-13 05:08:04.000000000 +0200
  23. +++ src.ntp.1129999861.8262.1253845312/ntp-4.2.0/include/ntpd.h 2005-10-24 00:29:57.000000000 +0200
  24. @@ -227,7 +227,7 @@
  25. /* ntp_control.c */
  26. struct ctl_trap;
  27. -extern struct ctl_trap ctl_trap[];
  28. +extern struct ctl_trap *ctl_trap;
  29. extern int num_ctl_traps;
  30. extern keyid_t ctl_auth_keyid; /* keyid used for authenticating write requests */
  31. diff -dur ntp-4.2.0/include/ntp_stdlib.h src.ntp.1129999861.8262.1253845312/ntp-4.2.0/include/ntp_stdlib.h
  32. --- ntp-4.2.0/include/ntp_stdlib.h 2003-07-17 12:27:16.000000000 +0200
  33. +++ src.ntp.1129999861.8262.1253845312/ntp-4.2.0/include/ntp_stdlib.h 2005-10-24 00:29:23.000000000 +0200
  34. @@ -135,7 +135,7 @@
  35. /* clocktypes.c */
  36. struct clktype;
  37. -extern struct clktype clktypes[];
  38. +extern struct clktype *clktypes;
  39. /* getopt.c */
  40. extern char * ntp_optarg; /* global argument pointer */
  41. diff -dur ntp-4.2.0/libntp/clocktypes.c src.ntp.1129999861.8262.1253845312/ntp-4.2.0/libntp/clocktypes.c
  42. --- ntp-4.2.0/libntp/clocktypes.c 2003-07-17 12:27:20.000000000 +0200
  43. +++ src.ntp.1129999861.8262.1253845312/ntp-4.2.0/libntp/clocktypes.c 2005-10-24 00:31:43.000000000 +0200
  44. @@ -9,7 +9,7 @@
  45. #include "ntp_refclock.h"
  46. #include "ntp_stdlib.h"
  47. -struct clktype clktypes[] = {
  48. +struct clktype _clktypes[] = {
  49. { REFCLK_NONE, "unspecified type (0)",
  50. "UNKNOWN" },
  51. { REFCLK_LOCALCLOCK, "Undisciplined local clock (1)",
  52. @@ -102,6 +102,7 @@
  53. "NEOCLK4X"},
  54. { -1, "", "" }
  55. };
  56. +struct clktype *clktypes = _clktypes;
  57. const char *
  58. clockname(
  59. diff -dur ntp-4.2.0/ntpd/ntp_config.c src.ntp.1129999861.8262.1253845312/ntp-4.2.0/ntpd/ntp_config.c
  60. --- ntp-4.2.0/ntpd/ntp_config.c 2003-10-07 10:35:14.000000000 +0200
  61. +++ src.ntp.1129999861.8262.1253845312/ntp-4.2.0/ntpd/ntp_config.c 2005-10-24 00:55:21.000000000 +0200
  62. @@ -57,6 +57,8 @@
  63. int keytype;
  64. };
  65. +#define CONFIG_KEYS 8
  66. +
  67. /*
  68. * Command keywords
  69. */
  70. @@ -1118,7 +1120,7 @@
  71. if (ntokens >= 2)
  72. sys_automax = 1 << max(atoi(tokens[1]), 10);
  73. break;
  74. -
  75. +#define CONFIG_CRYPTO 39
  76. case CONFIG_CRYPTO:
  77. if (ntokens == 1) {
  78. crypto_config(CRYPTO_CONF_NONE, NULL);
  79. diff -dur ntp-4.2.0/ntpd/ntp_control.c src.ntp.1129999861.8262.1253845312/ntp-4.2.0/ntpd/ntp_control.c
  80. --- ntp-4.2.0/ntpd/ntp_control.c 2003-10-07 23:10:38.000000000 +0200
  81. +++ src.ntp.1129999861.8262.1253845312/ntp-4.2.0/ntpd/ntp_control.c 2005-10-24 00:32:54.000000000 +0200
  82. @@ -333,7 +333,7 @@
  83. * timed out.
  84. */
  85. /* ntp_request.c */
  86. -struct ctl_trap ctl_trap[CTL_MAXTRAPS];
  87. +struct ctl_trap *ctl_trap;
  88. int num_ctl_traps;
  89. /*
  90. diff -dur ntp-4.2.0/ntpd/ntp_request.c src.ntp.1129999861.8262.1253845312/ntp-4.2.0/ntpd/ntp_request.c
  91. --- ntp-4.2.0/ntpd/ntp_request.c 2003-10-07 13:02:33.000000000 +0200
  92. +++ src.ntp.1129999861.8262.1253845312/ntp-4.2.0/ntpd/ntp_request.c 2005-10-24 00:47:53.000000000 +0200
  93. @@ -2208,6 +2208,13 @@
  94. /*
  95. + * Imported from the control module
  96. + */
  97. +extern struct ctl_trap *ctl_trap;
  98. +extern int num_ctl_traps;
  99. +
  100. +
  101. +/*
  102. * req_get_traps - return information about current trap holders
  103. */
  104. static void
  105. @@ -2221,12 +2228,6 @@
  106. register struct ctl_trap *tr;
  107. register int i;
  108. - /*
  109. - * Imported from the control module
  110. - */
  111. - extern struct ctl_trap ctl_trap[];
  112. - extern int num_ctl_traps;
  113. -
  114. if (num_ctl_traps == 0) {
  115. req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
  116. return;