Ticket #47164: openvas-libnasl.bison3.patch

File openvas-libnasl.bison3.patch, 1.8 KB (added by larryv (Lawrence Velázquez), 10 years ago)
  • dports/security/openvas-libnasl/Portfile

    commit 7c4ca2f8a0e6a9a9d5b8d8bd0476f8c5dae996ce
    Author: Lawrence Velázquez <larryv@macports.org>
    Date:   15 minutes ago
    
        openvas-libnasl: Fix build with Bison 3 (comment:47:ticket:41600)
    
    diff --git a/dports/security/openvas-libnasl/Portfile b/dports/security/openvas-libnasl/Portfile
    index cd53aae..da975c8 100644
    a b depends_lib \ 
    3535    path:bin/gpgme-config:gpgme \
    3636    path:bin/libopenvas-config:openvas-libraries
    3737
    38 patchfiles              patch-configure.diff
     38patchfiles              patch-configure.diff \
     39                        bison3.patch
    3940
    4041use_parallel_build      yes
    4142
  • new file dports/security/openvas-libnasl/files/bison3.patch

    diff --git a/dports/security/openvas-libnasl/files/bison3.patch b/dports/security/openvas-libnasl/files/bison3.patch
    new file mode 100644
    index 0000000..84aa967
    - +  
     1Index: nasl/nasl_grammar.y
     2===================================================================
     3--- nasl/nasl_grammar.y.orig
     4+++ nasl/nasl_grammar.y
     5@@ -1,4 +1,5 @@
     6-%pure_parser
     7+%define api.pure
     8+%param {void * parm}
     9 %expect 1
     10 %{
     11 /* Nessus Attack Scripting Language version 2
     12@@ -19,9 +20,6 @@
     13  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     14  */
     15 
     16-#define YYPARSE_PARAM parm
     17-#define YYLEX_PARAM parm
     18-
     19 #define LNB    (((naslctxt*)parm)->line_nb)
     20 #include "includes.h"
     21 #include "nasl_tree.h"
     22@@ -32,7 +30,7 @@
     23 #include "nasl_debug.h"
     24 #include "nasl_signature.h"
     25 
     26-static void naslerror(const char *);
     27+static void naslerror(void *, const char *);
     28 #define YYERROR_VERBOSE
     29 %}
     30 
     31@@ -470,7 +468,7 @@ glob: GLOBAL arg_decl
     32 #include <stdlib.h>
     33 
     34 static void
     35-naslerror(const char *s)
     36+naslerror(void *parm, const char *s)
     37 {
     38   fputs(s, stderr);
     39 }