Skip to content

Instantly share code, notes, and snippets.

@andyjones
Last active September 20, 2015 13:40
Show Gist options
  • Save andyjones/d37f20e5c40599b51d6b to your computer and use it in GitHub Desktop.
Save andyjones/d37f20e5c40599b51d6b to your computer and use it in GitHub Desktop.
Avoid `arch/auto/Sereal/Encoder/Encoder.so: undefined symbol: DPPP_my_newSV_type` on perl 5.8.8
index abfbd02..9bc2189 100644
--- a/Perl/Encoder/Encoder.xs
+++ b/Perl/Encoder/Encoder.xs
@@ -5,7 +5,7 @@
#include "perl.h"
#include "XSUB.h"
-#define NEED_newSV_type
+#define NEED_newSV_type_GLOBAL
#include "ppport.h"
#include "srl_encoder.h"
diff --git a/Perl/Encoder/Encoder.xs b/Perl/Encoder/Encoder.xs
index abfbd02..295008e 100644
--- a/Perl/Encoder/Encoder.xs
+++ b/Perl/Encoder/Encoder.xs
@@ -5,7 +5,6 @@
#include "perl.h"
#include "XSUB.h"
-#define NEED_newSV_type
#include "ppport.h"
#include "srl_encoder.h"
diff --git a/Perl/Encoder/srl_encoder.c b/Perl/Encoder/srl_encoder.c
index 98e3373..2b98ffd 100644
--- a/Perl/Encoder/srl_encoder.c
+++ b/Perl/Encoder/srl_encoder.c
@@ -7,6 +7,7 @@ extern "C" {
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
+#define NEED_newSV_type
#include "ppport.h"
#ifdef __cplusplus
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment