This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl.h: Add EXTERN_C for flock()
authorKarl Williamson <khw@cpan.org>
Tue, 14 Jan 2020 16:30:13 +0000 (09:30 -0700)
committerKarl Williamson <khw@cpan.org>
Tue, 21 Jan 2020 16:29:09 +0000 (09:29 -0700)
This was failing to load on Solaris with g++

Thanks to Dagfinn Ilmari MannsÃ¥ker for figuring this out.

perl.h

diff --git a/perl.h b/perl.h
index 57b9d2b..7fbbd59 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -7060,7 +7060,7 @@ C<strtoul>.
 #endif
 
 #if defined(HAS_FLOCK) && !defined(HAS_FLOCK_PROTO)
-int flock(int fd, int op);
+EXTERN_C int flock(int fd, int op);
 #endif
 
 #ifndef O_RDONLY