The Samba-Bugzilla – Bug 10850
lib/nss_wrapper won't compile on Solaris platform
Last modified: 2017-04-29 02:56:57 UTC
I use the attached patch and it works for us. It might not be the best way to fix it.
No patch attached :-). Can you upload it please ?
Created attachment 10325 [details]
Solaris has two different implementations for gethostbyname_r(). We set the correct variables to use the POSIX API and not the SUN API.
* Defining _POSIX_PTHREAD_SEMANTICS before including pwd.h and grp.h gives us
* the posix getpwnam_r(), getpwuid_r(), getgrnam_r and getgrgid_r calls on
The question is why is this not working for your Solaris. It works just fine with OpenIndiana.
Comment on attachment 10325 [details]
Last time I checked master compiles just fine on Solaris (this is Solaris 11.1). Can you check whether this is actually still an issue with master?
Created attachment 10622 [details]
Compiling error on Solaris 11.x
We are using SmartOS. Today I installed Solaris 11.2 and tried to compile Samba master, it failed for the same reason.
Please refer to the attached file for more information.
Can you please take a look at the header files. Do they contain POSIX versions of gethostbyname_r?
(In reply to Andreas Schneider from comment #6)
No, Solaris does not have posix definitions of gethostbyname_r and gethostbyaddr_r.
Please look at the following URL for what they have, although it's from illumos-gate, but the file content is very similar (I have checked on a real Solaris 11.2 installation).