Package: rdist / 6.1.5-19

06-126527-missing_prototypes.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=126527

Missing prototypes impact ia64

Unprototyped functions are presumed by the C compiler to return
integers; pointers on ia64 are frequently truncated and corrupted
due to a lack of prototypes.

ctime, strerror, and strtol all return 64-bit values, and are
handled properly via the included patch.

John R.Daily <jdaily@progeny.com>

Index: rdist-6.1.5/include/defs.h
===================================================================
--- rdist-6.1.5.orig/include/defs.h
+++ rdist-6.1.5/include/defs.h
@@ -19,8 +19,8 @@
  */
 #if	defined(_POSIX_SOURCE)
 #include <unistd.h>
-#include <stdlib.h>
 #endif	/* _POSIX_SOURCE */
+#include <stdlib.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <errno.h>
@@ -28,6 +28,7 @@
 #include <grp.h>
 #include <syslog.h>
 #include <setjmp.h>
+#include <time.h>
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/file.h>
@@ -73,6 +74,9 @@
 #if	defined(NEED_STRING_H)
 #include <string.h>
 #endif	/* NEED_STRING_H */
+#if	defined(NEED_MNTENT_H)
+#include <mntent.h>
+#endif	/* NEED_MNTENT_H */
 
 #if defined(ARG_TYPE)
 #if	ARG_TYPE == ARG_STDARG
@@ -319,11 +323,15 @@ extern int 		juststatdb;
 /*
  * System function declarations
  */
+#ifndef NEED_MNTENT_H
 char 			       *hasmntopt();
+#endif
+#ifndef NEED_STRING_H
 char			       *strchr();
 char		 	       *strdup();
 char		 	       *strrchr();
 char 			       *strtok();
+#endif
 
 /*
  * Our own declarations.