File sblim-gather-2.1.2_pointers.patch of Package sblim-gather

Index: comms/rcstest.c
===================================================================
--- comms/rcstest.c.orig	2004-10-15 15:45:49.000000000 +0200
+++ comms/rcstest.c	2007-01-12 15:59:37.317184945 +0100
@@ -45,16 +45,16 @@ static void * _get_request(void * hdl)
   
   while (1) {
     buflen = sizeof(buf);
-    if (rcs_getrequest((int)hdl,buf,&buflen) == -1) {
+    if (rcs_getrequest((int)(intptr_t)hdl,buf,&buflen) == -1) {
       //fprintf(stderr,"--- time out on socket %i\n",(int)hdl);
       break;
     }
-    fprintf(stderr,"---- received on socket %i: %s\n",(int)hdl,buf);
+    fprintf(stderr,"---- received on socket %i: %s\n",(int)(intptr_t)hdl,buf);
   }
 
   pthread_mutex_lock(&connect_mutex);
   for(i=0;i<MAXCONN;i++) {
-    if (clthdl[i] == (int)hdl) {
+    if (clthdl[i] == (int)(intptr_t)hdl) {
       clthdl[i] = -1;
       connects--;
       break;
@@ -93,7 +93,7 @@ int main()
 	break;
       } 
     }
-    if (pthread_create(&thread_id[i],NULL,_get_request,(void*)hdl) != 0) {
+    if (pthread_create(&thread_id[i],NULL,_get_request,(void*)(intptr_t)hdl) != 0) {
       perror("create thread");
       return -1;
     }
Index: slisten.c
===================================================================
--- slisten.c.orig	2006-03-07 13:55:20.000000000 +0100
+++ slisten.c	2007-01-12 15:59:37.317184945 +0100
@@ -81,7 +81,7 @@ static void * subs_listener(void *unused
   M_TRACE(MTRACE_FLOW,MTRACE_RREPOS,
 	  ("subs_listener"));
   fdsocket = socket(AF_UNIX,SOCK_DGRAM,0);
-  pthread_cleanup_push(subs_listener_cleanup,(void*)fdsocket);
+  pthread_cleanup_push(subs_listener_cleanup,(void*)(intptr_t)fdsocket);
   if (fdsocket != -1) {
     atexit(subs_listener_exit);
     sockname.sun_family = AF_UNIX;
openSUSE Build Service is sponsored by