Blackforest
Blackforest

Reputation: 1069

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?

Upvotes: 2

Views: 2067

Answers (2)

Jens
Jens

Reputation: 72619

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

Upvotes: 1

octopusgrabbus
octopusgrabbus

Reputation: 10685

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.

Upvotes: 0

Related Questions