pkgsrc-Bugs archive

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

pkg/56182: libdazzle build failure on Solaris 10 x86_64 using GCC 8.4



>Number:         56182
>Category:       pkg
>Synopsis:       libdazzle build failure on Solaris 10 x86_64 using GCC 8.4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 17 12:30:00 +0000 2021
>Originator:     Claes Nästén
>Release:        trunk 2021-05-17
>Organization:
>Environment:
SunOS u40 5.10 Generic_147148-26 i86pc i386 i86pc

>Description:
Compiling libdazzle on Solaris 10 x86_64 fails with the following error:

../src/util/dzl-counter.c: In function '_dzl_counter_arena_destroy':                                                       ../src/util/dzl-counter.c:421:18: error: passing argument 1 of 'munmap' from incompatible pointer type [-Werror=incompatibl
e-pointer-types]                                                                                                                munmap (arena->cells, arena->data_length);
             ~~~~~^~~~~~~                                                                                                  In file included from ../src/util/dzl-counter.c:36:
/usr/include/sys/mman.h:169:19: note: expected 'caddr_t' {aka 'char *'} but argument is of type 'DataCell *' {aka 'struct <
anonymous> *'}
 extern int munmap(caddr_t, size_t);
                   ^~~~~~~
cc1: some warnings being treated as errors

Provided patch casts the arena->cells to void* which should be safe both in the caddr_t and void* case.
>How-To-Repeat:
Build libdazzle on Solaris 10 with GCC 8.4.
>Fix:
$NetBSD$

--- src/util/dzl-counter.c.orig 2021-05-17 11:39:35.264143047 +0000
+++ src/util/dzl-counter.c
@@ -418,7 +418,7 @@ _dzl_counter_arena_destroy (DzlCounterAr
   g_assert (arena != NULL);
 
   if (arena->data_is_mmapped)
-    munmap (arena->cells, arena->data_length);
+    munmap ((void*) arena->cells, arena->data_length);
   else
 #ifdef G_OS_WIN32
     /* Allocated with _aligned_malloc() */


Home | Main Index | Thread Index | Old Index