1 |
slords |
1.1 |
diff -ur buffer-1.19.orig/buffer.c buffer-1.19/buffer.c |
2 |
|
|
--- buffer-1.19.orig/buffer.c Wed Jun 7 15:30:20 2000 |
3 |
|
|
+++ buffer-1.19/buffer.c Wed Jun 7 15:44:55 2000 |
4 |
|
|
@@ -109,6 +109,8 @@ |
5 |
|
|
* Initial revision |
6 |
|
|
* |
7 |
|
|
*/ |
8 |
|
|
+#include <stdlib.h> |
9 |
|
|
+#include <string.h> |
10 |
|
|
#include <unistd.h> |
11 |
|
|
#include <stdio.h> |
12 |
|
|
#include <signal.h> |
13 |
|
|
@@ -509,7 +511,7 @@ |
14 |
|
|
if( debug ) |
15 |
|
|
fprintf( stderr, "%s pbuffer is 0x%08x, buffer_size is %d [%d x %d]\n", |
16 |
|
|
proc_string, |
17 |
|
|
- (char *)pbuffer, buffer_size, blocks, blocksize ); |
18 |
|
|
+ (unsigned int) (char *)pbuffer, buffer_size, blocks, blocksize ); |
19 |
|
|
|
20 |
|
|
#ifdef SYS5 |
21 |
|
|
memset( (char *)pbuffer, '\0', buffer_size ); |
22 |
|
|
diff -ur buffer-1.19.orig/sem.c buffer-1.19/sem.c |
23 |
|
|
--- buffer-1.19.orig/sem.c Wed Jun 7 15:30:20 2000 |
24 |
|
|
+++ buffer-1.19/sem.c Wed Jun 7 16:00:04 2000 |
25 |
|
|
@@ -28,13 +28,14 @@ |
26 |
|
|
|
27 |
|
|
#include <stdio.h> |
28 |
|
|
#include <sys/types.h> |
29 |
|
|
+#include <unistd.h> |
30 |
|
|
#include <sys/stat.h> |
31 |
|
|
#include <sys/ipc.h> |
32 |
|
|
#include <sys/sem.h> |
33 |
|
|
#include <errno.h> |
34 |
|
|
#include "sem.h" |
35 |
|
|
|
36 |
|
|
-#if defined(SYS5) || defined(ultrix) || defined(_AIX) |
37 |
|
|
+#if defined(SYS5) || defined(ultrix) || defined(_AIX) || defined _SEM_SEMUN_UNDEFINED |
38 |
|
|
union semun { |
39 |
|
|
int val; |
40 |
|
|
struct semid_ds *buf; |
41 |
|
|
@@ -95,7 +96,7 @@ |
42 |
|
|
return sem; |
43 |
|
|
} |
44 |
|
|
|
45 |
|
|
-static |
46 |
|
|
+static void |
47 |
|
|
do_sem( sem_id, pbuf, err ) |
48 |
|
|
int sem_id; |
49 |
|
|
struct sembuf *pbuf; |
50 |
|
|
@@ -152,7 +153,7 @@ |
51 |
|
|
if( sem_id == -1 ) |
52 |
|
|
return; |
53 |
|
|
|
54 |
|
|
- if( semctl( sem_id, 0, IPC_RMID, NULL ) == -1 ){ |
55 |
|
|
+ if( semctl( sem_id, 0, IPC_RMID, (union semun) 0 ) == -1 ){ |
56 |
|
|
report_proc(); |
57 |
|
|
perror( "internal error, failed to remove semaphore" ); |
58 |
|
|
} |