All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Hund <heiko.hund@...1489...>
To: openvpn-devel@lists.sourceforge.net
Subject: [Openvpn-devel] [PATCH] make sure sa_family_t is defined
Date: Fri, 17 Jan 2014 16:30:37 +0100	[thread overview]
Message-ID: <1389972638-8006-1-git-send-email-heiko.hund@...1489...> (raw)

On Windows there's no sa_family_t. This patch defines it in
syshead.h is configure did not find it in the system headers.

Signed-off-by: Heiko Hund <heiko.hund@...1489...>
---
 configure.ac          |    6 ++++++
 src/openvpn/syshead.h |    7 +++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 636d4e2..65dbc25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -501,6 +501,12 @@ AC_CHECK_TYPE(
 	[[${SOCKET_INCLUDES}]]
 )
 AC_CHECK_TYPE(
+        [sa_family_t],
+        [AC_DEFINE([HAVE_SA_FAMILY_T], [1], [struct in_pktinfo needed for IP_PKTINFO support])],
+        ,
+        [[${SOCKET_INCLUDES}]]
+)
+AC_CHECK_TYPE(
 	[struct sockaddr_in6],
 	,
 	[AC_MSG_ERROR([struct sockaddr_in6 not found, needed for ipv6 transport support.])],
diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h
index ab6fa01..4050d54 100644
--- a/src/openvpn/syshead.h
+++ b/src/openvpn/syshead.h
@@ -426,6 +426,13 @@
 #endif
 
 /*
+ * Define type sa_family_t if it isn't defined in the socket headers
+ */
+#ifndef HAVE_SA_FAMILY_T
+typedef unsigned short sa_family_t;
+#endif
+
+/*
  * Disable ESEC
  */
 #if 0
-- 
1.7.9



             reply	other threads:[~2014-01-17 15:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17 15:30 Heiko Hund [this message]
2014-01-17 15:30 ` [Openvpn-devel] [PATCH] convert struct signal_info element Heiko Hund
2014-01-17 18:11   ` Arne Schwabe
2014-01-17 19:06   ` [Openvpn-devel] [PATCH applied] " Gert Doering
2014-01-17 18:10 ` [Openvpn-devel] [PATCH] make sure sa_family_t is defined Arne Schwabe
2014-01-17 19:06 ` [Openvpn-devel] [PATCH applied] " Gert Doering

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389972638-8006-1-git-send-email-heiko.hund@...1489... \
    --to=openvpn-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.