diff --git a/bindings/perl/Sigar.pm b/bindings/perl/Sigar.pm index 76b66aa1..59ae79df 100644 --- a/bindings/perl/Sigar.pm +++ b/bindings/perl/Sigar.pm @@ -38,7 +38,5 @@ else { XSLoader::load(__PACKAGE__, $VERSION); } -sub NULL_HWADDR() { "00:00:00:00:00:00" } - 1; __END__ diff --git a/bindings/perl/Sigar.xs b/bindings/perl/Sigar.xs index 872c37c9..3bd0615f 100644 --- a/bindings/perl/Sigar.xs +++ b/bindings/perl/Sigar.xs @@ -137,6 +137,9 @@ static int proc_env_getvalue(void *data, #define XS_SIGAR_CONST_IV(name) \ (void)newCONSTSUB(stash, #name, newSViv(SIGAR_##name)) +#define XS_SIGAR_CONST_PV(name) \ + (void)newCONSTSUB(stash, #name, newSVpv(SIGAR_##name, 0)) + static void boot_Sigar_constants(pTHX) { HV *stash = gv_stashpv("Sigar", TRUE); @@ -151,6 +154,7 @@ static void boot_Sigar_constants(pTHX) XS_SIGAR_CONST_IV(IFF_PROMISC); XS_SIGAR_CONST_IV(IFF_ALLMULTI); XS_SIGAR_CONST_IV(IFF_MULTICAST); + XS_SIGAR_CONST_PV(NULL_HWADDR); } MODULE = Sigar PACKAGE = Sigar