ntirpc icon indicating copy to clipboard operation
ntirpc copied to clipboard

compile error without -DPORTMAP

Open zhengyf opened this issue 6 years ago • 1 comments

https://github.com/nfs-ganesha/ntirpc/blob/dba123c3cbfa258923010a87a730618b8780b827/src/clnt_bcast.c#L242

When I trying to compile without -DPORTMAP,here is some ERROR:

libntirpc/src/clnt_bcast.c:242:6: error: variable ‘pmap_reply_flag’ set but not used [-Werror=unused-but-set-variable]
int pmap_reply_flag; /* reply recvd from PORTMAP */

So I moved 'int pmap_reply_flag;' into '#ifdef PORTMAP' at line 264.

Then I get ERROR:

libntirpc/src/clnt_bcast.c:563:33: error: ‘pmap_reply_flag’ undeclared (first use in this function)
pmap_reply_flag = 0;

I moved 'pmap_reply_flag = 0;' into '#ifdef PORTMAP' too. (at line 569)

Then compile successful.

Is this change useful?

zhengyf avatar May 24 '18 08:05 zhengyf

That appears to be sufficient to build; however, this has been hard-coded on for so long, there's no guarantees that it actually works with portmap compiled out. Feel free to submit a PR.

dang avatar May 24 '18 13:05 dang

This is old and no response from the reporter. Closing as wontfix.

ffilz avatar May 14 '24 20:05 ffilz