File sblim-gather-2.1.8_pointers.patch of Package sblim-gather
--- comms/rcstest.c
+++ comms/rcstest.c
@@ -43,27 +43,27 @@
size_t buflen;
rhdl = (long)hdl;
- fprintf(stderr,"--- start thread on socket %i\n",(int)rhdl);
+ fprintf(stderr,"--- start thread on socket %i\n",(int)(intptr_t)rhdl);
while (1) {
buflen = sizeof(buf);
if (rcs_getrequest((int)rhdl,buf,&buflen) == -1) {
- fprintf(stderr,"--- time out on socket %i\n",(int)rhdl);
+ fprintf(stderr,"--- time out on socket %i\n",(int)(intptr_t)rhdl);
break;
}
- fprintf(stderr,"---- received on socket %i: %s\n",(int)rhdl,buf);
+ fprintf(stderr,"---- received on socket %i: %s\n",(int)(intptr_t)rhdl,buf);
}
pthread_mutex_lock(&connect_mutex);
for(i=0;i<MAXCONN;i++) {
- if (clthdl[i] == (int)rhdl) {
+ if (clthdl[i] == (int)(intptr_t)rhdl) {
clthdl[i] = -1;
connects--;
break;
}
}
pthread_mutex_unlock(&connect_mutex);
- fprintf(stderr,"--- exit thread on socket %i\n",(int)rhdl);
+ fprintf(stderr,"--- exit thread on socket %i\n",(int)(intptr_t)rhdl);
return NULL;
}
@@ -97,7 +97,7 @@
}
}
thdl = hdl;
- if (pthread_create(&thread_id[i],NULL,_get_request,(void *)thdl) != 0) {
+ if (pthread_create(&thread_id[i],NULL,_get_request,(void *)(intptr_t)thdl) != 0) {
perror("create thread");
return -1;
}
--- slisten.c
+++ slisten.c
@@ -81,7 +81,7 @@
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;