From: Sebastien Estienne Date: Tue, 2 May 2006 15:10:31 +0000 (+0000) Subject: Patch from Padraig O'Briain to build avahi on Solaris X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=d0a63590d4730eb0af3ec6027818cb62d50ea657;p=catta Patch from Padraig O'Briain to build avahi on Solaris git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1206 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-core/iface-pfroute.c b/avahi-core/iface-pfroute.c index 8b76afa..51f6773 100644 --- a/avahi-core/iface-pfroute.c +++ b/avahi-core/iface-pfroute.c @@ -32,7 +32,9 @@ #include #include #include +#ifdef HAVE_SYS_SYSCTL_H #include +#endif #include #include @@ -108,7 +110,11 @@ static void rtm_info(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m) #define ROUNDUP(a) \ ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) +#ifdef HAVE_SYS_SYSCTL_H #define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len)) +#else +#define ADVANCE(x, n) (x += ROUNDUP(sizeof(struct sockaddr))) +#endif static void rtm_addr(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m) { @@ -140,8 +146,10 @@ static void rtm_addr(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m) if (!(addrs & 1<sa_len == 0) continue; +#endif switch(sa->sa_family) { case AF_INET: switch (1<rtm_msglen) { rtm = (struct rt_msghdr *)next; diff --git a/avahi-core/socket.c b/avahi-core/socket.c index 0eb0374..bd72934 100644 --- a/avahi-core/socket.c +++ b/avahi-core/socket.c @@ -31,6 +31,9 @@ #include #include #include +#ifdef HAVE_SYS_FILIO_H +#include +#endif #include #include diff --git a/avahi-daemon/simple-protocol.c b/avahi-daemon/simple-protocol.c index 740f78b..04b07c7 100644 --- a/avahi-daemon/simple-protocol.c +++ b/avahi-daemon/simple-protocol.c @@ -49,6 +49,13 @@ #include "chroot.h" #endif +#ifndef AF_LOCAL +#define AF_LOCAL AF_UNIX +#endif +#ifndef PF_LOCAL +#define PF_LOCAL PF_UNIX +#endif + #define BUFFER_SIZE (20*1024) #define CLIENTS_MAX 50 diff --git a/bootstrap.sh b/bootstrap.sh index d0f85cc..ada993f 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -55,7 +55,7 @@ case "$USER" in FLAGS="$FLAGS --disable-qt4" ;; sebest) - FLAGS="$FLAGS --enable-monodoc=auto --enable-dbus=auto --enable-mono=auto --enable-qt3=auto --enable-qt4=auto --sysconfdir=/etc --localstatedir=/var --prefix=/usr --disable-manpages --disable-xmltoman" + FLAGS="$FLAGS --disable-monodoc --enable-dbus=no --enable-mono=no --enable-qt3=no --enable-qt4=no --sysconfdir=/etc --localstatedir=/var --prefix=/usr --disable-manpages --disable-xmltoman" ;; esac diff --git a/configure.ac b/configure.ac index a7d2c65..bf22be8 100644 --- a/configure.ac +++ b/configure.ac @@ -84,6 +84,28 @@ AC_DEFINE([HAVE_PF_ROUTE],[],[Support for PF_ROUTE]) AM_CONDITIONAL(HAVE_PF_ROUTE, [ test x"$HAVE_PF_ROUTE" = xyes ]) +# +# Check for sys/filio.h; needed for FIONREAD on Solaris +# +AC_CHECK_HEADER(sys/filio.h, +HAVE_SYS_FILIO_H=yes +AC_DEFINE([HAVE_SYS_FILIO_H],[],[Support for sys/filio.h]) +, [], [ +]) + +AM_CONDITIONAL(HAVE_SYS_FILIO_H, [ test x"$HAVE_SYS_FILIO_H" = xyes ]) + +# +# Check for sys/sysctl.h; not present on Solaris +# +AC_CHECK_HEADER(sys/sysctl.h, +HAVE_SYS_SYSCTL=yes +AC_DEFINE([HAVE_SYS_SYSCTL_H],[],[Support for sys/sysctl.h]) +, [], [ +]) + +AM_CONDITIONAL(HAVE_SYS_SYSCTL_H, [ test x"$HAVE_SYS_SYSCTL_H" = xyes ]) + # # Check for struct ip_mreqn # @@ -541,7 +563,9 @@ if test "x$HAVE_PYTHON" = "xyes" ; then fi AM_CHECK_PYMOD(socket,,,[AC_MSG_ERROR(Could not find Python module socket)]) - AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)]) + if test "x$HAVE_GDBM" = "xyes"; then + AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)]) + fi fi fi AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ]) diff --git a/service-type-database/Makefile.am b/service-type-database/Makefile.am index 2b20512..3250e94 100644 --- a/service-type-database/Makefile.am +++ b/service-type-database/Makefile.am @@ -22,6 +22,7 @@ EXTRA_DIST=build-db.in service-types pkgdata_DATA=service-types if HAVE_PYTHON +if HAVE_GDBM noinst_SCRIPTS=build-db pkgdata_DATA+=service-types.db @@ -36,3 +37,4 @@ service-types.db: service-types build-db CLEANFILES = service-types.db build-db endif +endif