diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2011-06-04 19:36:11 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2011-06-04 19:36:11 -0400 |
commit | c985cf0d12d71b75721031252ab52c75d83492f3 (patch) | |
tree | 4acc72e8edd82f3c0870dd1b83ea234eccbebc18 | |
parent | 15d8cfb77bae3fc8a9c77b7b0447dceadf959a94 (diff) | |
download | postgresql-c985cf0d12d71b75721031252ab52c75d83492f3.tar.gz postgresql-c985cf0d12d71b75721031252ab52c75d83492f3.zip |
Allow building with perl 5.14.
Patch from Alex Hunsaker.
-rw-r--r-- | src/pl/plperl/plperl.c | 2 | ||||
-rw-r--r-- | src/pl/plperl/plperl.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index f7cda64b73d..46209c8cd4a 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -700,7 +700,7 @@ plperl_trusted_init(void) if (!isGV_with_GP(sv) || !GvCV(sv)) continue; SvREFCNT_dec(GvCV(sv)); /* free the CV */ - GvCV(sv) = NULL; /* prevent call via GV */ + GvCV_set(sv, NULL); /* prevent call via GV */ } hv_clear(stash); /* invalidate assorted caches */ diff --git a/src/pl/plperl/plperl.h b/src/pl/plperl/plperl.h index f33cb869f29..4efc8f02ef8 100644 --- a/src/pl/plperl/plperl.h +++ b/src/pl/plperl/plperl.h @@ -43,6 +43,11 @@ #undef bool #endif +/* supply GvCV_set if it's missing - ppport.h doesn't supply it, unfortunately */ +#ifndef GvCV_set +#define GvCV_set(gv, cv) (GvCV(gv) = cv) +#endif + /* routines from spi_internal.c */ int spi_DEBUG(void); int spi_LOG(void); |