Skip Menu |

This queue is for tickets about the BSD-Process CPAN distribution.

Report information
The Basics
Id: 122947
Status: open
Priority: 0/
Queue: BSD-Process

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.07
Fixed in: (no value)



Subject: Compilation fails on FreeBSD 11
On a FreeBSD 11.1 system: ... cc -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -pipe -DVERSION=\"0.07\" -DXS_VERSION=\"0.07\" -DPIC -fPIC "-I/usr/perl5.27.3p/lib/5.27.3/amd64-freebsd/CORE" Process.c Process.xs:294:65: error: use of undeclared identifier 'P_KTHREAD' hv_store(h, "kthread", 7, newSViv(NO_FREEBSD_4x(P_FLAG(P_KTHREAD))), 0); ^ 1 error generated. *** Error code 1 ...
On Sun Sep 03 13:24:47 2017, SREZIC wrote: Show quoted text
> On a FreeBSD 11.1 system: > > ... > cc -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing > -pipe -fstack-protector-strong -I/usr/local/include > -D_FORTIFY_SOURCE=2 -O2 -pipe -DVERSION=\"0.07\" > -DXS_VERSION=\"0.07\" -DPIC -fPIC "- > I/usr/perl5.27.3p/lib/5.27.3/amd64-freebsd/CORE" Process.c > Process.xs:294:65: error: use of undeclared identifier 'P_KTHREAD' > hv_store(h, "kthread", 7, > newSViv(NO_FREEBSD_4x(P_FLAG(P_KTHREAD))), 0); > ^ > 1 error generated. > *** Error code 1 > ...
There is a patch in FreeBSD ports for this: --- Process.xs.orig 2013-06-22 16:19:28 UTC +++ Process.xs @@ -291,7 +291,12 @@ HV *_procinfo (struct kinfo_proc *kp, in hv_store(h, "advlock", 7, newSViv(NO_FREEBSD_4x(P_FLAG(P_ADVLOCK))), 0); hv_store(h, "controlt", 8, newSViv(NO_FREEBSD_4x(P_FLAG(P_CONTROLT))), 0); + +#if __FreeBSD_version < 1100097 hv_store(h, "kthread", 7, newSViv(NO_FREEBSD_4x(P_FLAG(P_KTHREAD))), 0); +#else + hv_store(h, "kthread", 7, newSViv(NO_FREEBSD_4x(P_FLAG(P_KPROC))), 0); +#endif #if __FreeBSD_version < 802501 hv_store(h, "noload", 6, newSViv(NO_FREEBSD_4x(P_FLAG(P_NOLOAD))), 0); #endif