Subject: | ppport.h out of date and LIBSSH2_VERSION_PATCH can be empty |
.cpan/build/Net-SSH2-0.36-yIBPcH 536 > make
Skip blib/lib/Net/SSH2/File.pm (unchanged)
Skip blib/lib/Net/SSH2/Dir.pm (unchanged)
Skip blib/lib/Net/SSH2/PublicKey.pm (unchanged)
Skip blib/lib/Net/SSH2/SFTP.pm (unchanged)
Skip blib/lib/Net/SSH2/Listener.pm (unchanged)
Skip blib/lib/Net/SSH2/Channel.pm (unchanged)
Skip blib/lib/Net/SSH2.pm (unchanged)
ccache cc -c -I/usr/local/include -I/usr/include -I/pro/include -I. -
fPIC -fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.36\" -
DXS_VERSION=\"0.36\" -fPIC "-I/pro/lib/perl5/5.10.1/x86_64-linux/
CORE" SSH2.c
In file included from SSH2.xs:11:
ppport.h:3042:1: warning: "PERL_UNUSED_DECL" redefined
In file included from SSH2.xs:8:
/pro/lib/perl5/5.10.1/x86_64-linux/CORE/perl.h:330:1: warning: this is
the location of the previous definition
SSH2.c:2222:90: error: operator '&&' has no right operand
make: *** [SSH2.o] Error 1
You're still shipping ppport-3.06, whereas the most recent
Devel::PPPort is 3.19
When I replace ppport with the newer version:
$ perl ppport.h
Suggested changes:
--- ./SSH2.xs
+++ ./SSH2.xs.patched
@@ -8,6 +8,8 @@
#include "perl.h"
#include "XSUB.h"
+#define NEED_newRV_noinc
+#define NEED_sv_2pv_flags
#include "ppport.h"
#include <libssh2.h>
@@ -1014,7 +1016,7 @@
clear_error(ss);
count = av_len(event) + 1;
debug("%s::poll: timeout = %d, array[%d]\n", class, timeout,
count);
- if (!count) // some architectures return null for malloc(0)
+ if (!count) /* some architectures return null for malloc(0) */
XSRETURN_IV(0);
New(0, pollfd, count, LIBSSH2_POLLFD);
$ perl ppport.h --patch=z
$ patch -p0 <z
$ make
/pro/bin/perl "-Iinc" /pro/lib/perl5/5.10.1/ExtUtils/xsubpp -typemap /
pro/lib/perl5/5.10.1/ExtUtils/typemap -typemap typemap SSH2.xs >
SSH2.xsc && mv SSH2.xsc SSH2.c
ccache cc -c -I/usr/local/include -I/usr/include -I/pro/include -I. -
fPIC -fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.36\" -
DXS_VERSION=\"0.36\" -fPIC "-I/pro/lib/perl5/5.10.1/x86_64-linux/
CORE" SSH2.c
SSH2.c:2224:90: error: operator '&&' has no right operand
$ grep LIBSSH2_VERSION /usr/include/libssh2.h
#define LIBSSH2_VERSION "1.1"
#define LIBSSH2_VERSION_MAJOR 1
#define LIBSSH2_VERSION_MINOR 1
#define LIBSSH2_VERSION_PATCH
parsing and comparions by programs. The LIBSSH2_VERSION_NUM define
will
#define LIBSSH2_VERSION_NUM 0x010100
#define LIBSSH2_SSH_BANNER "SSH-2.0-libssh2_"
LIBSSH2_VERSION