diff options
author | David Sommerseth <davids@redhat.com> | 2011-11-21 16:17:44 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2012-01-11 16:02:47 +0100 |
commit | 032f0045246846f566f7433e95376916beb980b0 (patch) | |
tree | 0c93384858a3d86ff4ee7d4abc8580a7b70e0755 /options.c | |
parent | edf8bbacd18d063e50c6a7f787f7e413d146af87 (diff) | |
download | openvpn-032f0045246846f566f7433e95376916beb980b0.tar.gz openvpn-032f0045246846f566f7433e95376916beb980b0.tar.xz openvpn-032f0045246846f566f7433e95376916beb980b0.zip |
Fix compilation errors on Linux platforms without SO_MARK
When trying to compile OpenVPN on RHEL5/CentOS5, it would fail
due to missing declaration of SO_MARK. SO_MARK is a feature which
first arrived in 2.6.26, and was never backported to RHEL5's 2.6.18
kernel base.
This patch adds a check at configure time, to see if SO_MARK is
available or not.
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -292,7 +292,7 @@ static const char usage_message[] = " or --fragment max value, whichever is lower.\n" "--sndbuf size : Set the TCP/UDP send buffer size.\n" "--rcvbuf size : Set the TCP/UDP receive buffer size.\n" -#ifdef TARGET_LINUX +#if defined(TARGET_LINUX) && defined(HAVE_SO_MARK) "--mark value : Mark encrypted packets being sent with value. The mark value\n" " can be matched in policy routing and packetfilter rules.\n" #endif @@ -1504,7 +1504,7 @@ show_settings (const struct options *o) #endif SHOW_INT (rcvbuf); SHOW_INT (sndbuf); -#ifdef TARGET_LINUX +#if defined(TARGET_LINUX) && defined(HAVE_SO_MARK) SHOW_INT (mark); #endif SHOW_INT (sockflags); @@ -4745,7 +4745,7 @@ add_option (struct options *options, } else if (streq (p[0], "mark") && p[1]) { -#ifdef TARGET_LINUX +#if defined(TARGET_LINUX) && defined(HAVE_SO_MARK) VERIFY_PERMISSION (OPT_P_GENERAL); options->mark = atoi(p[1]); #endif |