Mercurial > illumos > illumos-gate
changeset 13873:89c188fb29f6
3263 link.h should work in a largefile environment
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Reviewed by: Gordon Ross <gwr@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
author | Richard Lowe <richlowe@richlowe.net> |
---|---|
date | Sun, 07 Oct 2012 05:32:30 +0000 |
parents | 20563857eb2d |
children | cab67b95c26b |
files | usr/src/head/link.h |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/head/link.h Mon Oct 08 03:37:11 2012 +0100 +++ b/usr/src/head/link.h Sun Oct 07 05:32:30 2012 +0000 @@ -28,7 +28,7 @@ #include <sys/link.h> #ifndef _ASM -#include <libelf.h> +#include <elf.h> #include <sys/types.h> #include <dlfcn.h> #endif @@ -39,9 +39,15 @@ #ifndef _ASM /* - * ld support library calls + * ld support library calls. + * + * These cannot be used in a 32bit large file capable environment because + * libelf is not large-file safe. Only define these interfaces if we are not + * 32bit, or not in the large file environment. */ +#if !defined(_ILP32) || _FILE_OFFSET_BITS != 64 #ifdef __STDC__ +#include <libelf.h> extern uint_t ld_version(uint_t); extern void ld_input_done(uint_t *); @@ -88,6 +94,7 @@ #endif /* (defined(_LP64) || defined(_LONGLONG_TYPE) */ #endif /* __STDC__ */ +#endif /* !defined(_ILP32) || _FILE_OFFSET_BITS != 64 */ /* * ld_version() version values.