From: Steve Peters Date: Sat, 18 Nov 2006 05:04:42 +0000 (+0000) Subject: Tweaks needed to get Perl compiling with g++ on OpenBSD. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b91fbb9359c40ba617276a21a86b8809f9df07f0;p=p5sagit%2Fp5-mst-13.2.git Tweaks needed to get Perl compiling with g++ on OpenBSD. p4raw-id: //depot/perl@29313 --- diff --git a/perl.h b/perl.h index 5fa0da3..e7c0c5a 100644 --- a/perl.h +++ b/perl.h @@ -1180,6 +1180,10 @@ EXTERN_C char *crypt(const char *, const char *); EXTERN_C char **environ; #endif +#if defined(__OpenBSD__) && defined(__cplusplus) +EXTERN_C char **environ; +#endif + #if defined(__CYGWIN__) && defined(__cplusplus) EXTERN_C char *crypt(const char *, const char *); #endif diff --git a/perlio.c b/perlio.c index 0b202de..2236c50 100644 --- a/perlio.c +++ b/perlio.c @@ -4627,7 +4627,7 @@ PerlIOMmap_map(pTHX_ PerlIO *f) } posn = (b->posn / PL_mmap_page_size) * PL_mmap_page_size; len = st.st_size - posn; - m->mptr = mmap(NULL, len, PROT_READ, MAP_SHARED, fd, posn); + m->mptr = (Mmap_t)mmap(NULL, len, PROT_READ, MAP_SHARED, fd, posn); if (m->mptr && m->mptr != (Mmap_t) - 1) { #if 0 && defined(HAS_MADVISE) && defined(MADV_SEQUENTIAL) madvise(m->mptr, len, MADV_SEQUENTIAL);