diff --git a/configure.ac b/configure.ac index 8628588..be62b51 100644 --- a/configure.ac +++ b/configure.ac @@ -85,6 +85,15 @@ AC_ARG_WITH([bash], [BASHPATH="$withval"], [AC_PATH_PROG([BASHPATH], [bash])]) AC_CHECK_PROGS([GROFF], [groff]) +if test -n "$GROFF"; then + AC_MSG_CHECKING([whether groff supports HTML output]) + if echo '.TH test 1' | $GROFF -mandoc -Thtml >/dev/null 2>&1; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + GROFF="" + fi +fi # Checks for typedefs. AC_TYPE_UID_T @@ -100,6 +109,11 @@ AC_TYPE_SIZE_T AC_TYPE_SSIZE_T # Checks for libraries. + +# On Solaris/illumos, socket functions live in libsocket and gethostbyname in libnsl +AC_SEARCH_LIBS([socket], [socket]) +AC_SEARCH_LIBS([gethostbyname], [nsl]) + PKG_CHECK_MODULES([nss],[nss]) PKG_CHECK_MODULES([corosync_common], [libcorosync_common]) PKG_CHECK_MODULES([cmap], [libcmap]) diff --git a/qdevices/tlv.c b/qdevices/tlv.c index c741359..ba3973e 100644 --- a/qdevices/tlv.c +++ b/qdevices/tlv.c @@ -43,7 +43,7 @@ /* * 64-bit variant of ntoh is not exactly standard... */ -#if defined(__linux__) +#if defined(__linux__) || defined(__sun) #include #elif defined(__FreeBSD__) || defined(__NetBSD__) #include diff --git a/qdevices/unix-socket.c b/qdevices/unix-socket.c index 611101c..31cd426 100644 --- a/qdevices/unix-socket.c +++ b/qdevices/unix-socket.c @@ -44,6 +44,11 @@ #include "unix-socket.h" #include "utils.h" +/* On Solaris/illumos, GCC predefines "sun" as a numeric macro for platform + * detection, which conflicts with the local variable name "sun" used for + * struct sockaddr_un. */ +#undef sun + int unix_socket_server_create(const char *path, int set_socket_umask, mode_t socket_umask, gid_t socket_gid, int non_blocking, int backlog) diff --git a/qdevices/utils.c b/qdevices/utils.c index 5cbc7ee..fdf893f 100644 --- a/qdevices/utils.c +++ b/qdevices/utils.c @@ -32,6 +32,10 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include