From 941c53a3bf0f0c1c276996e2a68b0fa6263ce410 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 25 Jan 2017 08:00:50 +0000 Subject: [PATCH] [efi] Fix building elf2efi.c when -fpic is enabled by default The x86_64 EDK2 headers include a #pragma to mark all subsequent symbol declarations and references as hidden if position-independent code is being generated. Since libgen.h is currently included only after the EDK2 headers, this results in __xpg_basename() being erroneously marked as having hidden visibility (if the compiler defaults to building position-independent code); this eventually results in a failure to link the elf2efi binary. Fix by including libgen.h prior to including the EDK2 headers. Originally-fixed-by: Doug Goldstein Signed-off-by: Michael Brown --- src/util/elf2efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c index 152bf533..27f37d98 100644 --- a/src/util/elf2efi.c +++ b/src/util/elf2efi.c @@ -32,9 +32,9 @@ #include #include #include +#include #include #include -#include #define eprintf(...) fprintf ( stderr, __VA_ARGS__ )