pkgsrc-Bugs archive

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

pkg/46354: sysutils/cfengine2 only compiles with GCC



>Number:         46354
>Category:       pkg
>Synopsis:       sysutils/cfengine2 only compiles with GCC
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 19 01:50:00 +0000 2012
>Originator:     Lloyd Parkes
>Release:        Solaris 5.10
>Organization:
Inland Revenue
>Environment:
SunOS package-builder 5.10 Generic_147440-14 sun4v sparc SUNW,Sun-Fire-T200

>Description:
One line in src/do.c in cfengine2 uses what appears to be a non-standard 
construct with the ternary operator. The Sun Pro C compiler considers it a 
syntax error and so do I.

>How-To-Repeat:
Build sysutils/cfengine2 from pkgsrc with the Sun Pro C compiler.
>Fix:
I'll put this patch somewhere on the web once I get it home.

$NetBSD$

--- src/do.c.orig       Sun Mar  8 09:27:56 2009
+++ src/do.c    Tue Apr 17 17:19:17 2012
@@ -2846,7 +2846,7 @@
 
    ExpandVarstring(ptr->name,name,"");
    
-   snprintf(lock,CF_BUFSIZE-1,"%s_%d_%s_%d_%s_%s", name, ptr->cmp, ptr->ver ? 
ptr->ver: "" ,ptr->action, ptr->defines ?: "", ptr->elsedef ?: "");
+   snprintf(lock,CF_BUFSIZE-1,"%s_%d_%s_%d_%s_%s", name, ptr->cmp, ptr->ver ? 
ptr->ver: "" ,ptr->action, ptr->defines ?ptr->defines: "", ptr->elsedef 
?ptr->elsedef: "");
    
    if 
(!GetLock(ASUniqueName("packages"),CanonifyName(lock),ptr->ifelapsed,ptr->expireafter,VUQNAME,CFSTARTTIME))
       {



Home | Main Index | Thread Index | Old Index