summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPetr Salinger <Petr.Salinger@seznam.cz>2008-07-07 17:57:37 +0200
committerJulien Danjou <julien@danjou.info>2008-07-07 17:57:37 +0200
commita9d15a08451c76a9250642c9f662f296196f60a0 (patch)
tree3bd9e1daef52a5f3fc047ecfe8ba5b648b276236 /configure.ac
parentee78071902e93ce22a3170f0937c158fd16894d8 (diff)
fix FreeBSD support
The GNU/kFreeBSD (and BSDs in general) have a different layout of struct sockaddr, sockaddr_in, sockaddr_un ... The first member do not have to be "sa_family", they also have "sa_len" field. Signed-off-by: Julien Danjou <julien@danjou.info>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 91f7ae5..8b8cbdf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,14 @@ AC_HEADER_STDC
AC_SEARCH_LIBS(getaddrinfo, socket)
AC_SEARCH_LIBS(connect, socket)
+dnl check for the sockaddr_un.sun_len member
+AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
+ [AC_DEFINE(HAVE_SOCKADDR_SUN_LEN,1,[Have the sockaddr_un.sun_len member.])],
+ [],
+ [ #include <sys/types.h>
+ #include <sys/un.h>
+ ])
+
xcbincludedir='${includedir}/xcb'
AC_SUBST(xcbincludedir)