From bcf9fc28f653b1aa9f8408af5daa07efa6b2b5d4 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Sat, 21 May 2016 15:38:40 +0000 Subject: [PATCH] elftoolchain: backwards compatability for ELFOSABI_CLOUDABI definition It is not provided by sys/elf_common.h on older releases or -current before March 2015. Reported by: Jenkins --- contrib/elftoolchain/brandelf/brandelf.c | 5 +++++ contrib/elftoolchain/elfcopy/main.c | 5 +++++ contrib/elftoolchain/readelf/readelf.c | 3 +++ 3 files changed, 13 insertions(+) diff --git a/contrib/elftoolchain/brandelf/brandelf.c b/contrib/elftoolchain/brandelf/brandelf.c index 7cc93f02ca2a..d41b926db014 100644 --- a/contrib/elftoolchain/brandelf/brandelf.c +++ b/contrib/elftoolchain/brandelf/brandelf.c @@ -46,6 +46,11 @@ ELFTC_VCSID("$Id: brandelf.c 3440 2016-04-07 14:51:47Z emaste $"); +/* Backwards compatability for older FreeBSD releases. */ +#ifndef ELFOSABI_CLOUDABI +#define ELFOSABI_CLOUDABI 17 +#endif + static int elftype(const char *); static const char *iselftype(int); static void printelftypes(void); diff --git a/contrib/elftoolchain/elfcopy/main.c b/contrib/elftoolchain/elfcopy/main.c index ebc0c92a1c01..89ffab299769 100644 --- a/contrib/elftoolchain/elfcopy/main.c +++ b/contrib/elftoolchain/elfcopy/main.c @@ -41,6 +41,11 @@ ELFTC_VCSID("$Id: main.c 3446 2016-05-03 01:31:17Z emaste $"); +/* Backwards compatability for older FreeBSD releases. */ +#ifndef ELFOSABI_CLOUDABI +#define ELFOSABI_CLOUDABI 17 +#endif + enum options { ECP_ADD_GNU_DEBUGLINK, diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c index ba59275298cf..fcfc75d35f96 100644 --- a/contrib/elftoolchain/readelf/readelf.c +++ b/contrib/elftoolchain/readelf/readelf.c @@ -50,6 +50,9 @@ ELFTC_VCSID("$Id: readelf.c 3469 2016-05-15 23:16:09Z emaste $"); /* Backwards compatability for older FreeBSD releases. */ +#ifndef ELFOSABI_CLOUDABI +#define ELFOSABI_CLOUDABI 17 +#endif #ifndef EM_IAMCU #define EM_IAMCU 6 #endif