Stan.Pietkiewicz at statcan.gc.ca
2011-Jan-18 21:39 UTC
[Samba] Compiler error while building Samba 3.5.6
I am trying to build Samba 3.5.6 on an HP-UX 11.11 system, and I get this error: Compiling libsmb/libsmb_thread_impl.c In file included from ./../nsswitch/winbind_nss.h:54, from ./../nsswitch/winbind_nss_config.h:49, from ./../nsswitch/winbind_client.h:1, from include/includes.h:681, from libsmb/libsmb_thread_impl.c:20: ./../nsswitch/winbind_nss_hpux.h:133: error: field '__h_errno' declared as a function I'm using gcc (4.2.3) and GNU make (3.8.2) to do this. Any ideas as to what I might do to fix this? Thanks..... Stan
On Tue, Jan 18, 2011 at 04:39:01PM -0500, Stan.Pietkiewicz at statcan.gc.ca wrote:> I am trying to build Samba 3.5.6 on an HP-UX 11.11 system, and I get > this error: > > Compiling libsmb/libsmb_thread_impl.c > In file included from ./../nsswitch/winbind_nss.h:54, > from ./../nsswitch/winbind_nss_config.h:49, > from ./../nsswitch/winbind_client.h:1, > from include/includes.h:681, > from libsmb/libsmb_thread_impl.c:20: > ./../nsswitch/winbind_nss_hpux.h:133: error: field '__h_errno' declared > as a function > > I'm using gcc (4.2.3) and GNU make (3.8.2) to do this. Any ideas as to > what I might do to fix this?You might try the attached patch from master. If you want this to be fixed in 3.5.7, please open a bug report at https://bugzilla.samba.org. With best regards, Volker Lendecke -- SerNet GmbH, Bahnhofsallee 1b, 37081 G?ttingen phone: +49-551-370000-0, fax: +49-551-370000-9 AG G?ttingen, HRB 2816, GF: Dr. Johannes Loxen -------------- next part -------------- nsswitch/winbind_nss_hpux.h | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/nsswitch/winbind_nss_hpux.h b/nsswitch/winbind_nss_hpux.h index 40a352d..dba70a7 100644 --- a/nsswitch/winbind_nss_hpux.h +++ b/nsswitch/winbind_nss_hpux.h @@ -130,7 +130,12 @@ typedef struct nss_XbyY_args { void *returnval; int erange; - int h_errno; + /* + * h_errno is defined as function call macro for multithreaded applications + * in HP-UX. *this* h_errno is not used in the HP-UX codepath of our nss + * modules, so let's simply rename it: + */ + int h_errno_unused; nss_status_t status; } nss_XbyY_args_t;