| Summary: |
libpciaccess v0.12.0 build error on Solaris 10 x86 |
| Product: |
xorg
|
Reporter: |
Rajesh <rmandalemula> |
| Component: |
Lib/pciaccess | Assignee: |
Alan Coopersmith <alan.coopersmith> |
| Status: |
RESOLVED
FIXED
|
QA Contact: |
Xorg Project Team <xorg-team> |
| Severity: |
normal
|
|
|
| Priority: |
medium
|
|
|
| Version: |
unspecified | |
|
| Hardware: |
All | |
|
| OS: |
Solaris | |
|
| Whiteboard: |
|
|
i915 platform:
|
|
i915 features:
|
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
[I am building using Sun Studio cc v12.1] While building libpciaccess v0.12.0 on Solaris 10 x86, I get the below error: <<<<>>>> "scanpci.c", line 38: cannot find include file: <err.h> "scanpci.c", line 216: warning: implicit function declaration: err cc: acomp failed for scanpci.c <<<<>>>> The below patch to src/scanpci.c fixes the issue: <<<<>>> --- libpciaccess-0.12.0/src/scanpci.c~ 2009-02-13 05:17:58 +++ libpciaccess-0.12.0/src/scanpci.c 2010-10-26 20:41:43 @@ -24,7 +24,19 @@ #include <stdlib.h> #include <stdio.h> -#include <err.h> +#ifdef sun +# include <errno.h> +# define err(exitcode, format, args...) \ + errx(exitcode, format ": %s", ## args, strerror(errno)) +# define errx(exitcode, format, args...) \ + { warnx(format, ## args); exit(exitcode); } +# define warn(format, args...) \ + warnx(format ": %s", ## args, strerror(errno)) +# define warnx(format, args...) \ + fprintf(stderr, format "\n", ## args) +#else +# include <err.h> +#endif #include <unistd.h> <<<<>>> Thanks. Rajesh