pkgsrc-Bugs archive

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

pkg/40959: security/mhash with Sun Studio Compiler



>Number:         40959
>Category:       pkg
>Synopsis:       security/mhash with Sun Studio Compiler
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 04 11:05:00 +0000 2009
>Originator:     Jörn Clausen
>Release:        
>Organization:
University of Bielefeld
>Environment:
SunOS opensolaris 5.11 snv_101b i86pc i386 i86pc

>Description:
security/mhash does not compile with Sun Studio Compiler.
>How-To-Repeat:

>Fix:
One case of a void function returning an int:

--- lib/stdfns.c.orig   2009-03-04 02:04:19.075011426 -0800
+++ lib/stdfns.c
@@ -222,7 +222,8 @@ mutils_memcpy(void *dest, __const void *
        if ((n < 16) || ((mutils_word32)ptr1 & 0x3) || ((mutils_word32)ptr2 
 & 0x3))
        {
-               return mutils_memcpy8(ptr2, ptr1, n);
+               mutils_memcpy8(ptr2, ptr1, n);
+               return;
        }
 
        words = n >> 2;

Note that this has been fixed in the current version 0.9.9.9 of mhash.

And this definition of __const is not caught:

--- include/mutils/mutils.h.orig        2009-03-04 02:04:19.069664077 -0800
+++ include/mutils/mutils.h
@@ -23,7 +23,7 @@
 
 #include <mutils/mincludes.h>
 
-#if defined(const)
+#if defined(const) || (defined(sun) && !defined(__GNUC__))
 #define __const const
 #endif 

I'm not sure if one should also check for "__sun__", but this patch works both 
with Sun Studio and GCC. This patch has been sent to mhash developer list, but 
awaits approval.



Home | Main Index | Thread Index | Old Index