pkgsrc-Bugs archive

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

pkg/38674: libarchive broken on IRIX

>Number:         38674
>Category:       pkg
>Synopsis:       libarchive broken on IRIX
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 16 20:25:00 +0000 2008
>Originator:     Tobias Nygren
>Release:        n/a
IRIX irixbulk 6.5 07202013 IP32
Build of pkg_install fails with:

libarchive/archive_string.c:261: error: wcrtomb undeclared (first use in this 

The problem is that even though wchar.h exists, there is no prototype for 
wcrtomb() in the preprocessed output. It does exist in libc, though.

wchar.h contains this rather cryptic statement:
#if (_MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64)

build pkg_install on IRIX using gcc.

Following patch makes pkg_install build.

Index: archive_string.c
RCS file: 
retrieving revision
diff -u -r1.1.1.3 archive_string.c
--- archive_string.c    25 Apr 2008 15:07:25 -0000
+++ archive_string.c    16 May 2008 18:10:48 -0000
@@ -39,6 +39,10 @@
 #ifdef HAVE_WCHAR_H
 #include <wchar.h>
+#if defined(__sgi)
+/* Not in wchar.h? prototype taken from mbrchar(3S) */
+size_t wcrtomb(char *s, wchar_t wchar, mbstate_t *ps);
 #include "archive_private.h"

Home | Main Index | Thread Index | Old Index