pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/47130: pkg_select doesn't compile in pkgsrc



>Number:         47130
>Category:       pkg
>Synopsis:       pkg_select doesn't compile in pkgsrc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 26 10:00:09 +0000 2012
>Originator:     B.J. Stobiecki
>Release:        6.0
>Organization:
>Environment:
NetBSD net.omega.bsd 6.0 NetBSD 6.0 (GENERIC) amd64
>Description:
Program doesn't compile due to warnings which are treated as errors by default. 
The warning is:

"new qualifiers in middle of multi-level non-const cast are unsafe"

Which applies to install_many.c and pkgsrc.c sources.
>How-To-Repeat:
make in pkgtools/pkg_select
>Fix:
The following patches have helped:

--- pkgsrc.c    2009-03-08 14:25:53.000000000 +0000
+++ pkgsrc.c.fix        2012-10-26 11:36:15.000000000 +0000
@@ -80,7 +80,7 @@
 
        if ((list = build_mirror_list(method)) == NULL)
                return(NULL);
-       if ((etree = build_tree_from_list((const char **)list)) == NULL) {
+       if ((etree = build_tree_from_list((void*)list)) == NULL) {
                free_list(&list);
                return(NULL);
        }
@@ -247,7 +247,7 @@
        free_list(&list);
        
        if ((etree = 
-            build_tree_from_list((const char **)branchlist)) == NULL) {
+            build_tree_from_list((void*)branchlist)) == NULL) {
                free_list(&branchlist);
                return(NULL);
        }



--- install_many.c      2009-03-08 14:25:53.000000000 +0000
+++ install_many.c.fix  2012-10-26 11:35:40.000000000 +0000
@@ -199,7 +199,7 @@
                if ((list = build_list_from_slist()) == NULL)
                        goto out;
                if ((etree = 
-                    build_tree_from_list((const char **)list)) == NULL)
+                    build_tree_from_list((void*)list)) == NULL)
                        goto out;
 
                XFREE(resp);



Home | Main Index | Thread Index | Old Index