$OpenBSD: patch-libvncserver_rfbserver_c,v 1.1.1.1 2004/12/02 21:21:23 sturm Exp $ --- libvncserver/rfbserver.c.orig Tue Jun 15 15:23:57 2004 +++ libvncserver/rfbserver.c Thu Dec 2 21:03:19 2004 @@ -101,7 +101,7 @@ rfbClientListInit(rfbScreenInfoPtr rfbSc { if(sizeof(rfbBool)!=1) { /* a sanity check */ - fprintf(stderr,"rfbBool's size is not 1 (%d)!\n",sizeof(rfbBool)); + fprintf(stderr,"rfbBool's size is not 1 (%ld)!\n",(long)sizeof(rfbBool)); /* we cannot continue, because rfbBool is supposed to be char everywhere */ exit(1); } @@ -227,7 +227,7 @@ rfbNewTCPOrUDPClient(rfbScreen,sock,isUD rfbClientIteratorPtr iterator; rfbClientPtr cl,cl_; struct sockaddr_in addr; - size_t addrlen = sizeof(struct sockaddr_in); + socklen_t addrlen = sizeof(struct sockaddr_in); cl = (rfbClientPtr)calloc(sizeof(rfbClientRec),1); @@ -523,7 +523,7 @@ rfbProcessClientProtocolVersion(cl) pv[sz_rfbProtocolVersionMsg] = 0; if (sscanf(pv,rfbProtocolVersionFormat,&major_,&minor_) != 2) { - char name[1024]; + char name[1025]; if(sscanf(pv,"RFB %03d.%03d %1024s\n",&major_,&minor_,name) != 3) { rfbErr("rfbProcessClientProtocolVersion: not a valid RFB client\n"); rfbCloseClient(cl);