xebd / accel-ppp

High performance PPTP/L2TP/PPPoE/IPoE server for Linux
GNU General Public License v2.0
296 stars 109 forks source link

Build error when using -DRADIUS=FALSE #13

Closed mountkin closed 6 years ago

mountkin commented 6 years ago
[ 49%] Linking C shared library libipv6_dhcp.so
/ppp-build/accel-pppd/shaper/shaper.c: In function 'parse_string':
/ppp-build/accel-pppd/shaper/shaper.c:241:6: error: 'conf_vendor' undeclared (first use in this function)
  if (conf_vendor == 9)

Fix:

diff --git a/accel-pppd/shaper/shaper.c b/accel-pppd/shaper/shaper.c
index e0d9569..8bb8b8a 100644
--- a/accel-pppd/shaper/shaper.c
+++ b/accel-pppd/shaper/shaper.c
@@ -237,9 +237,10 @@ static void parse_string(const char *str, int dir, int *speed, int *burst, int *
                        return;
                }
        }
-
+#ifdef RADIUS
        if (conf_vendor == 9)
                return;
+#endif

        val = strtol(str, &endptr, 10);
        if (*endptr == 0) {
xebd commented 6 years ago

commit ed367d962764b4e3b1e77cb4539b0a22643364a1