Subject: | Sys-Syslog fails to build under Haiku-OS |
Attempting to build bleadperl on Haiku-OS I received the error:
gcc -c -fno-strict-aliasing -pipe -O -DVERSION=\"0.29\"
-DXS_VERSION=\"0.29\" -fpic "-I../.." Syslog.c
/boot/home/dev/perl/git/perl/cpan/Sys-Syslog/Syslog.c: In function
`XS_Sys__Syslog_LOG_PRI':
/boot/home/dev/perl/git/perl/cpan/Sys-Syslog/Syslog.c:286: `LOG_PRIMASK'
undeclared (first use in this function)
/boot/home/dev/perl/git/perl/cpan/Sys-Syslog/Syslog.c:286: (Each
undeclared identifier is reported only once
/boot/home/dev/perl/git/perl/cpan/Sys-Syslog/Syslog.c:286: for each
function it appears in.)
make[1]: *** [Syslog.o] Error 1
make[1]: Leaving directory `/boot/home/dev/perl/git/perl/cpan/Sys-Syslog'
Similarly building Sys-Syslog-0.29 from CPAN with the system perl.
Adding a conditional definition to Syslog.xs fixes the compilation as
per the attached patch.
Otherwise:
https://github.com/tonycoz/Sys-Syslog/tree/haiku
against an updated gitpan/Sys-Syslog branch includes the fix.
Applying the same fix to bleadperl allows it to build successfully.
Tony
Subject: | fix-haiku.patch |
diff --git a/Syslog.xs b/Syslog.xs
index e1ba675..4bdbb3b 100644
--- a/Syslog.xs
+++ b/Syslog.xs
@@ -33,6 +33,9 @@ static SV *ident_svptr;
#include "const-c.inc"
+#ifndef LOG_PRIMASK
+#define LOG_PRIMASK 7
+#endif
#ifndef LOG_FAC
#define LOG_FACMASK 0x03f8