File: 01-warnings.patch

package info (click to toggle)
donkey 0.5-21
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 336 kB
  • ctags: 428
  • sloc: ansic: 1,965; makefile: 43; sh: 29
file content (33 lines) | stat: -rw-r--r-- 706 bytes parent folder | download | duplicates (2)
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
Description: Fix a couple of compiler warnings.
 - include <unistd.h> for getuid(2)
 - properly declare a static buffer
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2010-06-22

--- a/src/config.h
+++ b/src/config.h
@@ -18,11 +18,13 @@
 #define private static
 #define public  extern  
 
+#include <sys/types.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <assert.h>
+#include <unistd.h>
 
 #ifndef EXIT_SUCCESS
 #  define EXIT_SUCCESS 0
--- a/src/btoe.c
+++ b/src/btoe.c
@@ -244,7 +244,7 @@
 {
         char cp[9];	/* 64 + 2 = 66 bits */
         int p, i;
-	static buf[BUFSIZ];
+	static char buf[BUFSIZ];
 	char *engout = (char *)buf;
 	
         memcpy(cp, md, 8);