Hello, I am attempting to build Samba 4.2.0 RC4 (I have not tried previous versions yet) and after applying attached patches the build fails with (full build and configure output attached). [2006/3812] Compiling lib/nss_wrapper/nss_wrapper.c ../lib/nss_wrapper/nss_wrapper.c:2405:5: error: conflicting types for 'gethostby name_r' In file included from ../lib/nss_wrapper/nss_wrapper.c:65:0: /usr/include/netdb.h:238:17: note: previous declaration of 'gethostbyname_r' was here The prototype in Samba source is: int gethostbyname_r(const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop) Whereas the prototype in the system header is: struct hostent *gethostbyname_r (const char *, struct hostent *, char *, int, int *h_errnop); I see that this has been discussed before on samba-technical for Solaris 11.1 which shares a common ancestor with SmartOS/illumos. https://lists.samba.org/archive/samba-technical/2014-October/102829.html I have checked the uid_wrapper git repo (the 1.1.0 tag) and do not see tests of the prototype as indicated in the message. Am I missing where this was done? If it is not done, how do we proceed in getting this issue fixed, because as far as I can tell this is a show stopper for 4.2 on SmartOS and presumably the illumos family and with 3.6 being EOL'd SmartOS will not have any supported Samba version available. Thanks, -------------- next part -------------- --- ../orig/samba-4.2.0rc4/lib/texpect/texpect.c 2014-10-01 09:17:32.000000000 +0000 +++ lib/texpect/texpect.c 2015-01-25 02:47:54.666545647 +0000 @@ -63,6 +63,8 @@ #include <errno.h> #include <err.h> +#include <signal.h> + struct command { enum { CMD_EXPECT = 0, CMD_SEND, CMD_PASSWORD } type; unsigned int lineno; -------------- next part -------------- --- ../orig/samba-4.2.0rc4/source3/lib/unix_msg/unix_msg.c 2014-10-01 09:17:32.000000000 +0000 +++ source3/lib/unix_msg/unix_msg.c 2015-01-25 02:59:29.958547508 +0000 @@ -505,7 +505,9 @@ * Note: No need to check for overflow here, * since cmsg will store <= INT8_MAX fds. */ +#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL msglen += cmsg_space; +#endif data_len = iov_buflen(iov, iovlen); if (data_len == -1) { @@ -593,7 +595,9 @@ return 0; fail: +#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL close_fd_array(fds_copy, num_fds); +#endif return ret; }