diff options
author | jkoshy <jkoshy@FreeBSD.org> | 2006-12-18 05:40:01 +0000 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 2006-12-18 05:40:01 +0000 |
commit | 25bc13b7367e813ef4d53432a4e4383099e93ba0 (patch) | |
tree | 5ded8ca022a55b5ca759f3341c1e05289fb61a08 /lib/libelf/gelf_syminfo.c | |
parent | fdbeae7cd48d220f22f51d00a1b3c7c6525973ee (diff) | |
download | FreeBSD-src-25bc13b7367e813ef4d53432a4e4383099e93ba0.zip FreeBSD-src-25bc13b7367e813ef4d53432a4e4383099e93ba0.tar.gz |
Use <osreldate.h> rather than the OS version reported by the kernel
to determine which Elf Types are to be handled. Change the M4
templates to wrap an `#if __FreeBSD_version >= NNN'/`#endif' pair
around the generated code for each ELF data type, where `NNN' is
the OS version where the ELF type was added to the source tree.
This change allows cross-builds of old sources on newer FreeBSD
systems to work correctly.
Problem reported by: ru
Diffstat (limited to 'lib/libelf/gelf_syminfo.c')
-rw-r--r-- | lib/libelf/gelf_syminfo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libelf/gelf_syminfo.c b/lib/libelf/gelf_syminfo.c index 4d0adfe..90c1ed9 100644 --- a/lib/libelf/gelf_syminfo.c +++ b/lib/libelf/gelf_syminfo.c @@ -31,9 +31,12 @@ __FBSDID("$FreeBSD$"); #include <assert.h> #include <gelf.h> +#include <osreldate.h> #include "_libelf.h" +#if __FreeBSD_version >= 700025 + GElf_Syminfo * gelf_getsyminfo(Elf_Data *d, int ndx, GElf_Syminfo *dst) { @@ -144,3 +147,5 @@ gelf_update_syminfo(Elf_Data *d, int ndx, GElf_Syminfo *gs) return (1); } + +#endif /* __FreeBSD_version >= 700025 */ |