Search code examples
clinuxstructfunction-prototypes

argument doesn't match prototype error in Linux


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?


Solution

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