X-Git-Url: https://git.saurik.com/apple/libinfo.git/blobdiff_plain/b3dd680f589a1f02e301659e04768ef61be3b843..d90e699ca2566289cddc68cd0862d05780b54551:/rpc.subproj/svc_simple.c?ds=sidebyside diff --git a/rpc.subproj/svc_simple.c b/rpc.subproj/svc_simple.c index 3796844..c0952fd 100644 --- a/rpc.subproj/svc_simple.c +++ b/rpc.subproj/svc_simple.c @@ -84,6 +84,9 @@ struct proglst *pl; int registerrpc(prognum, versnum, procnum, progname, inproc, outproc) + int prognum; + int versnum; + int procnum; char *(*progname)(); xdrproc_t inproc, outproc; { @@ -103,13 +106,23 @@ registerrpc(prognum, versnum, procnum, progname, inproc, outproc) return (-1); } } - (void) pmap_unset((u_long)prognum, (u_long)versnum); - if (!svc_register(transp, (u_long)prognum, (u_long)versnum, +#ifdef __LP64__ + (void) pmap_unset((uint32_t)prognum, (uint32_t)versnum); + if (!svc_register(transp, (uint32_t)prognum, (uint32_t)versnum, universal, IPPROTO_UDP)) { (void) fprintf(stderr, "couldn't register prog %d vers %d\n", prognum, versnum); return (-1); } +#else + (void) pmap_unset((u_long)prognum, (u_long)versnum); + if (!svc_register(transp, (u_long)prognum, (u_long)versnum, + universal, IPPROTO_UDP)) { + (void) fprintf(stderr, "couldn't register prog %d vers %d\n", + prognum, versnum); + return (-1); + } +#endif pl = (struct proglst *)malloc(sizeof(struct proglst)); if (pl == NULL) { (void) fprintf(stderr, "registerrpc: out of memory\n");