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_cap.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_cap.c')
-rw-r--r-- | lib/libelf/gelf_cap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libelf/gelf_cap.c b/lib/libelf/gelf_cap.c index 6e1a9d9..76338a8 100644 --- a/lib/libelf/gelf_cap.c +++ b/lib/libelf/gelf_cap.c @@ -31,9 +31,12 @@ __FBSDID("$FreeBSD$"); #include <assert.h> #include <gelf.h> +#include <osreldate.h> #include "_libelf.h" +#if __FreeBSD_version >= 700025 + GElf_Cap * gelf_getcap(Elf_Data *d, int ndx, GElf_Cap *dst) { @@ -143,3 +146,5 @@ gelf_update_cap(Elf_Data *d, int ndx, GElf_Cap *gc) return (1); } + +#endif /* __FreeBSD_version >= 700025 */ |