<commit_before>Patch taken from Debian: http://bugs.debian.org/298697
------------------------------------------------------------------------
With the attached patch 'ntp' can be compiled
on amd64 using gcc-4.0.

The attached patch also changes the Build-Depends from libreadline4-dev
to libreadline5-dev.

Regards
<NAME>

diff -urN ../tmp-orig/ntp-4.2.0a+stable/include/ntp_stdlib.h ./include/ntp_stdlib.h
--- ../tmp-orig/ntp-4.2.0a+stable/include/ntp_stdlib.h	2003-05-04 16:50:25.000000000 +0200
+++ ./include/ntp_stdlib.h	2005-03-09 12:59:45.000000000 +0100
@@ -135,7 +135,7 @@
 
 /* clocktypes.c */
 struct clktype;
-extern struct clktype clktypes[];
+extern struct clktype *clktypes;
 
 /* getopt.c */
 extern char *	ntp_optarg;		/* global argument pointer */
diff -urN ../tmp-orig/ntp-4.2.0a+stable/include/ntpd.h ./include/ntpd.h
--- ../tmp-orig/ntp-4.2.0a+stable/include/ntpd.h	2004-05-04 07:01:25.000000000 +0200
+++ ./include/ntpd.h	2005-03-09 12:56:03.000000000 +0100
@@ -226,7 +226,6 @@
 
 /* ntp_control.c */
 struct ctl_trap;
-extern struct ctl_trap ctl_trap[];
 extern int	num_ctl_traps;
 extern keyid_t	ctl_auth_keyid;		/* keyid used for authenticating write requests */
 
diff -urN ../tmp-orig/ntp-4.2.0a+stable/libntp/clocktypes.c ./libntp/clocktypes.c
--- ../tmp-orig/ntp-4.2.0a+stable/libntp/clocktypes.c	2002-07-19 19:15:54.000000000 +0200
+++ ./libntp/clocktypes.c	2005-03-09 13:05:42.000000000 +0100
@@ -9,7 +9,7 @@
 #include "ntp_refclock.h"
 #include "ntp_stdlib.h"
 
-struct clktype clktypes[] = {
+struct clktype *clktypes = {
 	{ REFCLK_NONE,		"unspecified type (0)",
 	  "UNKNOWN" },
 	{ REFCLK_LOCALCLOCK,	"Undisciplined local clock (1)",<commit_msg>ntp 4.2.0: Correct the gcc4 patch<commit_after>Index: ntp-4.2.0/include/ntp_stdlib.h
===================================================================
--- ntp-4.2.0.orig/include/ntp_stdlib.h	2003-07-17 11:27:16.000000000 +0100
+++ ntp-4.2.0/include/ntp_stdlib.h	2005-11-26 18:39:14.000000000 +0000
@@ -133,10 +133,6 @@
 extern u_char *	cache_key;		/* key pointer */
 extern u_int	cache_keylen;		/* key length */
 
-/* clocktypes.c */
-struct clktype;
-extern struct clktype clktypes[];
-
 /* getopt.c */
 extern char *	ntp_optarg;		/* global argument pointer */
 extern int	ntp_optind;		/* global argv index */
Index: ntp-4.2.0/include/ntpd.h
===================================================================
--- ntp-4.2.0.orig/include/ntpd.h	2003-09-13 04:08:04.000000000 +0100
+++ ntp-4.2.0/include/ntpd.h	2005-11-26 18:38:45.000000000 +0000
@@ -226,8 +226,6 @@
 #endif
 
 /* ntp_control.c */
-struct ctl_trap;
-extern struct ctl_trap ctl_trap[];
 extern int	num_ctl_traps;
 extern keyid_t	ctl_auth_keyid;		/* keyid used for authenticating write requests */
 
Index: ntp-4.2.0/include/ntp_refclock.h
===================================================================
--- ntp-4.2.0.orig/include/ntp_refclock.h	2003-07-17 11:27:16.000000000 +0100
+++ ntp-4.2.0/include/ntp_refclock.h	2005-11-26 18:40:23.000000000 +0000
@@ -65,6 +65,7 @@
 	const char *clocktype;	/* long description */
 	const char *abbrev;	/* short description */
 };
+extern struct clktype clktypes[];
 
 /*
  * Configuration flag values
Index: ntp-4.2.0/include/ntp_control.h
===================================================================
--- ntp-4.2.0.orig/include/ntp_control.h	2003-08-14 08:31:47.000000000 +0100
+++ ntp-4.2.0/include/ntp_control.h	2005-11-26 18:41:22.000000000 +0000
@@ -266,6 +267,7 @@
 	u_char tr_flags;		/* trap flags */
 	u_char tr_version;		/* version number of trapper */
 };
+extern struct ctl_trap ctl_trap[];
 
 /*
  * Flag bits
{'fraction_non_alphanumeric': 0.2489638021552915, 'fraction_numerical': 0.13843603205305333, 'mean_word_length': 3.513715710723192, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 14, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5298666', 'n_tokens_mistral': 1747, 'n_tokens_neox': 1387, 'n_words': 264}