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.

110 lines
3.5 KiB

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