argument doesn't match prototype error in Linux

2k Views Asked by At

I have header file with the following function declaration:

extern  getEmailDetailsResult * getemaildetails_5(getEmailDetailsInput *, CLIENT *);

In my .C file, the function definition is

getEmailDetailsResult* getemaildetails_5(inputParams, rqstp)
    getEmailDetailsInput *inputParams;
    struct svc_req *rqstp;

When I compile my program in Unix, compilation is successful. But in Linux (gcc 4.1.2), I get the following error "error: argument ârqstpâ doesnât match prototype". The .h file which has the function prototype is generated by the OS during compilation. What may be the cause of error in Linux?

2

There are 2 best solutions below

2
On BEST ANSWER

It looks like the struct svc_req * pointer is not equivalent to the CLIENT * pointer.

0
On

You have two pointers, struct svc_req * and CLIENT *. You are getting this error because the two pointers each point to a different type. That is a struct svc_req is not the same kind of thing as a CLIENT, so the two pointers are not compatible.