summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pp_sys.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 59811e23dc..756ab10265 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1791,7 +1791,11 @@ PP(pp_sysseek)
if (gv && (mg = SvTIED_mg((SV*)gv, 'q'))) {
PUSHMARK(SP);
XPUSHs(SvTIED_obj((SV*)gv, mg));
+#if LSEEKSIZE > IVSIZE
+ XPUSHs(sv_2mortal(newSVnv((NV) offset)));
+#else
XPUSHs(sv_2mortal(newSViv((IV) offset)));
+#endif
XPUSHs(sv_2mortal(newSViv((IV) whence)));
PUTBACK;
ENTER;