summarylogtreecommitdiffstats
path: root/nmead-01.03.00-types.patch
blob: 2378ac1f6f6ea6ddea043799bb11bb156a5cf0f7 (plain)
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
diff -aur nmead-01.03.00/connection.c nmead-01.03.00-patched/connection.c
--- nmead-01.03.00/connection.c	2004-07-27 04:28:32.000000000 +0400
+++ nmead-01.03.00-patched/connection.c	2014-07-02 10:53:06.553994225 +0400
@@ -52,6 +52,7 @@
  *
  */
 
+#include <stdint.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <sys/types.h>
@@ -87,7 +88,7 @@
 
     /* Use the address of the newly-allocated memory block as the
        key ID. */
-    qkey = ftok (".", (int) c);
+    qkey = ftok (".", (uintptr_t) c & 0xff);
 
     c->msgbuffer = newmsgbuffer ();
     if (c->msgbuffer == NULL) {
diff -aur nmead-01.03.00/simtalk.c nmead-01.03.00-patched/simtalk.c
--- nmead-01.03.00/simtalk.c	2004-07-27 04:28:32.000000000 +0400
+++ nmead-01.03.00-patched/simtalk.c	2014-07-02 10:58:05.431015411 +0400
@@ -51,6 +51,7 @@
  *
  */
 
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -140,7 +141,7 @@
     sem_init (&semtick, 0, 1);
 
     ticker = (pthread_t *) malloc (sizeof (pthread_t));
-    pthread_create (ticker, NULL, tick, (void *) ti->tickinterval);
+    pthread_create (ticker, NULL, tick, (void *)(uintptr_t) ti->tickinterval);
 
     while (1) {
 
@@ -208,7 +209,7 @@
 */
 void * tick (void * arg)
 {
-    int tickinterval = (int) arg;
+    int tickinterval = (int)(intptr_t) arg;
 
     if (verbose >= 10)
         printf ("tick: started\n");