Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 220815 - app-arch/lzma-utils-4.32.5 doesn't compile on Solaris 9 SPARC
Summary: app-arch/lzma-utils-4.32.5 doesn't compile on Solaris 9 SPARC
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Solaris
: High normal (vote)
Assignee: Jeremy Olexa (darkside) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-07 21:00 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2009-12-27 16:22 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-05-07 21:00:49 UTC
One of the source files (io.c) was missing an include to limits.h. Contacted upstream and they fixed it, will be in next release of lzma-utils.

I will fix in the prefix overlay, this shouldn't need to go to the gentoo-x86 tree though.
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-05-07 21:09:36 UTC
Fixed in the prefix overlay as: r21633
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-05-07 21:10:30 UTC
Fixed in upstream git repo:

%% git show
commit 3042c025eebb81c1086772398e0c5c8c6be41cee
Author: Lasse Collin <lasse.collin@tukaani.org>
Date:   Wed May 7 23:32:03 2008 +0300

    Added #include <limits.h> to io.c for pre-C99 systems.

diff --git a/configure.ac b/configure.ac
index b2e4977..e391c40 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,7 +48,7 @@ AC_PROG_LIBTOOL
 AC_HEADER_STDC
 # There is currently no workarounds in this package if some of
 # these headers are missing:
-AC_CHECK_HEADERS([fcntl.h inttypes.h stddef.h stdlib.h string.h sys/time.h unistd.h utime.h], [], AC_MSG_ERROR([Required header file(s) are missing.]))
+AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stddef.h stdlib.h string.h sys/time.h unistd.h utime.h], [], AC_MSG_ERROR([Required header file(s) are missing.]))
 # Missing errno.h should be handled:
 AC_CHECK_HEADERS([errno.h])

diff --git a/src/liblzmadec/io.c b/src/liblzmadec/io.c
index c02f441..d82cfbf 100644
--- a/src/liblzmadec/io.c
+++ b/src/liblzmadec/io.c
@@ -35,6 +35,11 @@
 extern int errno
 #endif

+/* Needed for pre-C99 systems that have SIZE_MAX in limits.h. */
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
 #define LZMADEC_NO_STDIO
 #include "lzmadec.h"
 #undef LZMADEC_NO_STDIO