diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
commit | 7585facf05d927eb6df3929ce09ed5e60d905437 (patch) | |
tree | e4d14b4dc180db20356b6b01ce0112f3a2d7897e /src/dumm/ext | |
parent | c1343b3278cdf99533b7902744d15969f9d6fdc1 (diff) | |
download | vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.tar.gz vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.zip |
Imported Upstream version 5.0.2
Diffstat (limited to 'src/dumm/ext')
-rw-r--r-- | src/dumm/ext/dumm.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/dumm/ext/dumm.c b/src/dumm/ext/dumm.c index ca9b29388..603fac088 100644 --- a/src/dumm/ext/dumm.c +++ b/src/dumm/ext/dumm.c @@ -21,8 +21,8 @@ #include <library.h> #include <dumm.h> -#include <debug.h> -#include <utils/linked_list.h> +#include <utils/debug.h> +#include <collections/linked_list.h> #undef PACKAGE_NAME #undef PACKAGE_TARNAME @@ -30,6 +30,8 @@ #undef PACKAGE_STRING #undef PACKAGE_BUGREPORT #undef PACKAGE_URL +/* avoid redefintiion of snprintf etc. */ +#define RUBY_DONT_SUBST #include <ruby.h> static dumm_t *dumm; @@ -141,7 +143,11 @@ static VALUE guest_hash(VALUE class) if (!rb_cvar_defined(class, id)) { VALUE hash = guest_hash_create(class); +#ifdef RB_CVAR_SET_4_ARGS rb_cvar_set(class, id, hash, 0); +#else + rb_cvar_set(class, id, hash); +#endif return hash; } return rb_cvar_get(class, id); @@ -627,6 +633,7 @@ static VALUE iface_each_addr(int argc, VALUE *argv, VALUE self) { rb_raise(rb_eArgError, "must be called with a block"); } + list = linked_list_create(); Data_Get_Struct(self, iface_t, iface); enumerator = iface->create_address_enumerator(iface); while (enumerator->enumerate(enumerator, &addr)) |