1833582 Members
3784 Online
110061 Solutions
New Discussion

Error while compilation

 
Anand_30
Regular Advisor

Error while compilation

Hi,

I have ported some C++ application from HP-UX10.20 to HP-UX11.11. I get the following error while compiling the application in
HP-UX11.11:

passing arg 2 of `svc_sendreply' from incompatible pointer type

for the line:

(void) svc_sendreply(transp, xdr_void,
(char *)NULL);

Can anyone please help me out on this.

Thanks,
Anand.

3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: Error while compilation

It means that you have been less than rogorous in observing typing. The 2nd arg must be a pointer to a function of type xdrproc_t and also the 3rd argument must me cast as a caddr_t.

A man svc_sendreply should make this clear.
If it ain't broke, I can fix that.
Paddy_1
Valued Contributor

Re: Error while compilation

First of all check that portmapper is running and patches if any to the portmap are applied.

Since you seem to be compiling some rpc code why not try compiling it in the K&R c mode which I believe is turned on with -k switch.
rpcgen -k

The sufficiency of my merit is to know that my merit is NOT sufficient
Anand_30
Regular Advisor

Re: Error while compilation

Thanks Paddy,

Can you please tell me how to find out if the portmapper is running. Also, the
rpcgen -k option is not working.

-Anand