All pastes #779028 Raw Edit

Mine

public text v1 · immutable
·published 2007-11-18 03:22 UTC
rendered paste body
I needed to get the security/cfs port running on a FreeBSD 7 machine,
but it didn't compile at all. The issue was that rpcgen created
code like:
   
 extern  void * admproc_null_2(void *, CLIENT *);  
 extern  void * admproc_null_2_svc(void *, struct svc_req *);
 #define        ADMPROC_ATTACH ((unsigned long)(1))
   
but what worked was:
   
 extern  void * admproc_null_2(void *, CLIENT *);
 #define admproc_null_2_svc admproc_null_2
 #define        ADMPROC_ATTACH ((unsigned long)(1))
   
 (instead of prototyping the _svc function, just make it the same
 as the non _svc version)
   
And:
   
 #define        NFSPROC_SETATTR ((unsigned long)(2))
 extern  attrstat * nfsproc_setattr_2(sattrargs *, CLIENT *);
 extern  attrstat * nfsproc_setattr_2_svc(sattrargs *, struct svc_req *);
   
but what worked was:
   
 #define        NFSPROC_SETATTR ((unsigned long)(2))
 extern  attrstat * nfsproc_setattr_2(sattrargs *, SR *);
 #define nfsproc_setattr_2_svc nfsproc_setattr_2 
   
 (instead of a CLIENT *, have a SR *)
   
That is all code generated by rpcgen. I tried to run rpcgen with
the -b option, but that didn't really work.
   
I'm really without a clue here on how to resolve this, not knowing
what rpcgen really does do.
   
But I know that the binaries posted to
http://www.mavetju.org/~edwin/cfs-1.4.1-7.0.tar.gz do work on FreeBSD
7.0 and that I'm more than happy to see if I can get it up and
running with different options than patched the code generated by
rpcgen :-)