The Samba-Bugzilla – Bug 1627
Last modified: 2005-08-24 10:21:46 UTC
Since the nis headers are broken on HPUX 11.00, AIX 4.3 and 5.1
a propose a workaround.
The workaround is tested on quite a few Unices and Linuxes: Linux (Redhat 7.1
and 9), Solaris 5.6, Solaris 8, AIX4.3, AIX 5.1, HPUX 10.20, HPUX 11.00, HPUX
11.22, IRIX 6.5. FreeBSD 4.7. In short: it should behave correctly.
HPUX 11.00: yp_match is declared
/usr/include/rpcsvc/ypclnt.h:extern int yp_match(char *, char *, char *, int,
char **, int *);
That's a problem for HP's own C-compiler: the const argument user_name from
automount_lookup(), which is tried to pass non-const to yp_match.
I propose the remove the const from automount_lookup argument. (It must be
removed from both implementations, otherwise different conflicting headers show
up in includes/proto.h)
And two problems for AIX-5.1 (and AIX-4.3)
2) <rpcsvc/ypclnt.h> is not shielded with #ifndef against multiple inclusion.
proposed patch to remove the #include "rpcsvc/ypclnt.h", it is included in
3) The struct ypall_callback is only declared forward in <rpcsvc/yp_prot.h>.
therefore I get compiler error with xlc. changing the order of declaration fixes
Created attachment 608 [details]
patch for NIS (HP-UX and AIX)
Looks right to me. I'll check it in and watch the build farm.
originally against 3.0.6rc2
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.