summaryrefslogtreecommitdiffstats
path: root/lib/libelf/gelf_move.c
diff options
context:
space:
mode:
authorjkoshy <jkoshy@FreeBSD.org>2006-12-18 05:40:01 +0000
committerjkoshy <jkoshy@FreeBSD.org>2006-12-18 05:40:01 +0000
commit25bc13b7367e813ef4d53432a4e4383099e93ba0 (patch)
tree5ded8ca022a55b5ca759f3341c1e05289fb61a08 /lib/libelf/gelf_move.c
parentfdbeae7cd48d220f22f51d00a1b3c7c6525973ee (diff)
downloadFreeBSD-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_move.c')
-rw-r--r--lib/libelf/gelf_move.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libelf/gelf_move.c b/lib/libelf/gelf_move.c
index 96d0aae..d303b18 100644
--- a/lib/libelf/gelf_move.c
+++ b/lib/libelf/gelf_move.c
@@ -31,9 +31,12 @@ __FBSDID("$FreeBSD$");
#include <assert.h>
#include <gelf.h>
+#include <osreldate.h>
#include "_libelf.h"
+#if __FreeBSD_version >= 700025
+
GElf_Move *
gelf_getmove(Elf_Data *d, int ndx, GElf_Move *dst)
{
@@ -149,3 +152,5 @@ gelf_update_move(Elf_Data *d, int ndx, GElf_Move *gm)
return (1);
}
+
+#endif /* __FreeBSD_version >= 700025 */
OpenPOWER on IntegriCloud