Skip to content

Commit

Permalink
devel/p5-IO-AIO: Fix build on FreeBSD 14+
Browse files Browse the repository at this point in the history
In file included from AIO.xs:173:
In file included from /usr/include/sys/timerfd.h:33:
In file included from /usr/include/sys/proc.h:47:
/usr/include/sys/condvar.h:46:8: error: redefinition of 'cv'
struct cv {
       ^
/usr/local/lib/perl5/5.34/mach/CORE/sv.h:243:8: note: previous definition is here
struct cv {
       ^
618 warnings and 1 error generated.

Tested on:	14.0-ALPHA4
  • Loading branch information
sunpoet committed Sep 6, 2023
1 parent d5801ad commit 600ca97
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions devel/p5-IO-AIO/files/patch-AIO.xs
@@ -1,6 +1,18 @@
--- AIO.xs.orig 2022-09-25 16:29:50 UTC
--- AIO.xs.orig 2022-09-28 08:22:50 UTC
+++ AIO.xs
@@ -2924,7 +2924,7 @@ fexecve (SV *fh, SV *args, SV *envs = &PL_sv_undef)
@@ -169,9 +169,11 @@
# include <sys/eventfd.h>
#endif

+#define cv condvar_cv
#if HAVE_TIMERFD
# include <sys/timerfd.h>
#endif
+#undef cv

#if HAVE_RLIMITS
#include <sys/time.h>
@@ -2926,7 +2928,7 @@ fexecve (SV *fh, SV *args, SV *envs = &PL_sv_undef)
OUTPUT: RETVAL

int
Expand Down

0 comments on commit 600ca97

Please sign in to comment.