From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Apr 13 13:30:06 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AA121065672 for ; Tue, 13 Apr 2010 13:30:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C21458FC1E for ; Tue, 13 Apr 2010 13:30:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o3DDU5Kf044413 for ; Tue, 13 Apr 2010 13:30:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3DDU5a2044410; Tue, 13 Apr 2010 13:30:05 GMT (envelope-from gnats) Resent-Date: Tue, 13 Apr 2010 13:30:05 GMT Resent-Message-Id: <201004131330.o3DDU5a2044410@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Martin Matuska Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29A56106564A for ; Tue, 13 Apr 2010 13:27:17 +0000 (UTC) (envelope-from mm@mail2.vx.sk) Received: from mail2.vx.sk (neo.vx.sk [188.40.111.84]) by mx1.freebsd.org (Postfix) with ESMTP id A5E048FC19 for ; Tue, 13 Apr 2010 13:27:16 +0000 (UTC) Received: from neo.vx.sk (localhost [127.0.0.1]) by mail2.vx.sk (Postfix) with ESMTP id 96E922D979; Tue, 13 Apr 2010 15:27:15 +0200 (CEST) Received: from mail2.vx.sk ([127.0.0.1]) by neo.vx.sk (neo.vx.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id y7e8GamaUiKd; Tue, 13 Apr 2010 15:27:10 +0200 (CEST) Received: by mail2.vx.sk (Postfix, from userid 1001) id C5CE22D965; Tue, 13 Apr 2010 15:27:10 +0200 (CEST) Message-Id: <20100413132710.C5CE22D965@mail2.vx.sk> Date: Tue, 13 Apr 2010 15:27:10 +0200 (CEST) From: Martin Matuska To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: miwi@FreeBSD.org Subject: ports/145672: [PATCH] security/pecl-ssh2: fix build with php 5.3 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 13:30:06 -0000 >Number: 145672 >Category: ports >Synopsis: [PATCH] security/pecl-ssh2: fix build with php 5.3 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Apr 13 13:30:05 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Martin Matuska >Release: FreeBSD 8.0-RELEASE-p2 amd64 >Organization: >Environment: System: FreeBSD neo.vx.sk 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #28: Sun Apr 11 23:24:57 CEST 2010 >Description: - Fix PECL bug #14397 - compile fails on 5.3 (svn r270322) - Better 5.2/5.3 compat fixes (svn r275348) - Fix PECL bug #9500 - SSH2 sockets not being closed properly (svn r275356) Port maintainer (miwi@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.99 >How-To-Repeat: >Fix: --- pecl-ssh2-0.11_1.patch begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/security/pecl-ssh2/Makefile,v retrieving revision 1.7 diff -u -r1.7 Makefile --- Makefile 28 Aug 2009 18:54:45 -0000 1.7 +++ Makefile 13 Apr 2010 13:23:52 -0000 @@ -7,6 +7,7 @@ PORTNAME= ssh2 PORTVERSION= 0.11 +PORTREVISION= 1 CATEGORIES= security pear MASTER_SITES= LOCAL/chinsan/PECL/ PKGNAMEPREFIX= pecl- Index: files/patch-ssh2.c =================================================================== RCS file: /home/pcvs/ports/security/pecl-ssh2/files/patch-ssh2.c,v retrieving revision 1.2 diff -u -r1.2 patch-ssh2.c --- files/patch-ssh2.c 13 Apr 2010 13:08:55 -0000 1.2 +++ files/patch-ssh2.c 13 Apr 2010 13:23:52 -0000 @@ -1,14 +1,42 @@ ---- ./ssh2.c.orig 2007-08-11 23:25:25.000000000 -0400 -+++ ./ssh2.c 2010-04-13 09:05:17.000000000 -0400 -@@ -48,7 +48,6 @@ +--- ssh2.c.orig 2007-08-12 05:25:25.000000000 +0200 ++++ ssh2.c 2010-04-13 15:18:56.789317762 +0200 +@@ -47,14 +47,9 @@ + int le_ssh2_pkey_subsys; #endif - #ifdef ZEND_ENGINE_2 +-#ifdef ZEND_ENGINE_2 -static - ZEND_BEGIN_ARG_INFO(php_ssh2_first_arg_force_ref, 0) - ZEND_ARG_PASS_INFO(1) - ZEND_END_ARG_INFO() -@@ -484,7 +483,7 @@ +- ZEND_BEGIN_ARG_INFO(php_ssh2_first_arg_force_ref, 0) +- ZEND_ARG_PASS_INFO(1) +- ZEND_END_ARG_INFO() +-#else +-static unsigned char php_ssh2_first_arg_force_ref[] = { 1, BYREF_FORCE }; +-#endif ++ZEND_BEGIN_ARG_INFO(php_ssh2_first_arg_force_ref, 0) ++ ZEND_ARG_PASS_INFO(1) ++ZEND_END_ARG_INFO() + + /* ************* + * Callbacks * +@@ -358,7 +353,7 @@ + if (!session) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to initialize SSH2 session"); + efree(data); +- close(socket); ++ closesocket(socket); + return NULL; + } + libssh2_banner_set(session, LIBSSH2_SSH_DEFAULT_BANNER " PHP"); +@@ -434,7 +429,7 @@ + + last_error = libssh2_session_last_error(session, &error_msg, NULL, 0); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error starting up SSH connection(%d): %s", last_error, error_msg); +- close(socket); ++ closesocket(socket); + libssh2_session_free(session); + efree(data); + return NULL; +@@ -484,7 +479,7 @@ ZEND_FETCH_RESOURCE(session, LIBSSH2_SESSION*, &zsession, -1, PHP_SSH2_SESSION_RES_NAME, le_ssh2_session); @@ -17,7 +45,7 @@ libssh2_session_methods(session, &kex, &hostkey, &crypt_cs, &crypt_sc, &mac_cs, &mac_sc, &comp_cs, &comp_sc, &lang_cs, &lang_sc); #else kex = libssh2_session_methods(session, LIBSSH2_METHOD_KEX); -@@ -889,7 +888,7 @@ +@@ -889,7 +884,7 @@ for(i = 0; i < numfds; i++) { zval *subarray = *pollmap[i]; @@ -26,7 +54,7 @@ /* Make a new copy of the subarray zval* */ MAKE_STD_ZVAL(subarray); *subarray = **pollmap[i]; -@@ -899,8 +898,8 @@ +@@ -899,8 +894,8 @@ zval_copy_ctor(subarray); /* Fixup its refcount */ @@ -37,14 +65,23 @@ } zend_hash_del(Z_ARRVAL_P(subarray), "revents", sizeof("revents")); add_assoc_long(subarray, "revents", pollfds[i].revents); -@@ -1009,8 +1008,8 @@ +@@ -1009,8 +1004,8 @@ } zval_copy_ctor(©val); - copyval.is_ref = 0; - copyval.refcount = 1; -+ Z_UNSET_ISREF(copyval); -+ Z_SET_REFCOUNT(copyval, 1); ++ Z_UNSET_ISREF_P(©val); ++ Z_SET_REFCOUNT_P(©val, 1); convert_to_string(©val); if (*key == '*') { +@@ -1148,7 +1143,7 @@ + zval_ptr_dtor(&(*data)->disconnect_cb); + } + +- close((*data)->socket); ++ closesocket((*data)->socket); + + efree(*data); + *data = NULL; --- pecl-ssh2-0.11_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: