#include <sys/types.h>
#include <sys/socket.h>
#include <sys/param.h>
+#ifdef HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
+#endif
#include <net/route.h>
#include <net/if.h>
#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)
{
if (!(addrs & 1<<i))
continue;
sa = (struct sockaddr *)cp;
+#ifdef HAVE_SYS_SYSCTL_H
if (sa->sa_len == 0)
continue;
+#endif
switch(sa->sa_family) {
case AF_INET:
switch (1<<i) {
assert(m);
retry2:
+#ifdef HAVE_SYS_SYSCTL_H
mib[0] = CTL_NET;
mib[1] = PF_ROUTE;
mib[2] = 0; /* protocol */
avahi_log_error("route-sysctl-estimate");
return;
}
+#endif
if ((buf = avahi_malloc(needed)) == NULL)
{
avahi_log_error("malloc failed in avahi_interface_monitor_sync");
return;
}
+#ifdef HAVE_SYS_SYSCTL_H
if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) {
avahi_log_warn("sysctl failed: %s", strerror(errno));
if (errno == ENOMEM && count++ < 10) {
goto retry2;
}
}
+#endif
lim = buf + needed;
for (next = buf; next < lim; next += rtm->rtm_msglen) {
rtm = (struct rt_msghdr *)next;
#include <fcntl.h>
#include <sys/time.h>
#include <sys/ioctl.h>
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
#include <assert.h>
#include <sys/types.h>
#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
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
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
#
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" ])
pkgdata_DATA=service-types
if HAVE_PYTHON
+if HAVE_GDBM
noinst_SCRIPTS=build-db
pkgdata_DATA+=service-types.db
CLEANFILES = service-types.db build-db
endif
+endif