Adding sys / ioctl.ph to Perl Headers

I need to use sys / ioctl.ph and it is not included in the perl version (5.12.3) that comes with my slackware distribution.

I have done the following:

cd /usr/include h2ph sys/ioctl.ph cd /usr/lib64/perl5/site_perl/5.12.3/x86_64-linux-thread-multi/ mkdir sys mv ioctl.ph sys 

Now the perl interpreter does not complain about sys / ioctl.ph, but this is the error I get:

Illegal declaration of subroutine Functions::ServerSocket::__INT16_C at /usr/lib64/perl5/site_perl/5.12.3/x86_64-linux-thread-multi/_h2ph_pre.ph line 164.

This is what is in the file that causes the error on line 164:

unless (defined &__INT16_C(c)) { sub __INT16_C(c)() { &c } }

I don’t know where to start. Functions :: ServerSocket is one of my modules, but I do not have such a function in my file.

+4
source share
1 answer

The __INT16_C macro on your platform is probably simple, like

 #define __INT16_C(c) c 

Replace the code on line 164 with

 eval 'sub __INT16_C { my($c) = @_; eval q($c); }' unless defined (&__INT16_C); 

which generates other versions of h2ph .

0
source

All Articles