summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorPaul \"LeoNerd\" Evans <leonerd@leonerd.org.uk>2011-10-24 18:07:42 +0100
committerFlorian Ragwitz <rafl@debian.org>2011-12-01 15:23:13 +0100
commit4c3d8e12eba407ea54003da3b559af75fc927817 (patch)
tree4d89721472625f9741ab7b4ca1e24d7058ed0577 /ext
parentbd71e0a134e4707a8d678d30a1c445a5f9d9812c (diff)
downloadperl-4c3d8e12eba407ea54003da3b559af75fc927817.tar.gz
Fixups for older Perl versions:
* Pass package and version to XSLoader::load to keep older perl versions happy * Older perls do not define croak_sv; #define a workaround for them
Diffstat (limited to 'ext')
-rw-r--r--ext/Socket/Socket.pm2
-rw-r--r--ext/Socket/Socket.xs4
2 files changed, 5 insertions, 1 deletions
diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm
index d82aa2bfaf..20ae15b07b 100644
--- a/ext/Socket/Socket.pm
+++ b/ext/Socket/Socket.pm
@@ -612,7 +612,7 @@ sub sockaddr_un {
}
}
-XSLoader::load();
+XSLoader::load(__PACKAGE__, $VERSION);
my %errstr;
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index e164e67259..d7e7a11eb6 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -71,6 +71,10 @@ NETINET_DEFINE_CONTEXT
# define INADDR_LOOPBACK 0x7F000001
#endif /* INADDR_LOOPBACK */
+#ifndef croak_sv
+# define croak_sv(sv) croak(SvPV_nolen(sv))
+#endif
+
#ifndef HAS_INET_ATON
/*