summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Gray <[email protected]>2017-02-18 18:56:58 +1100
committerEmil Velikov <[email protected]>2017-02-20 16:39:24 +0000
commita042465c218eaed098d505e0a2e78508b554fc67 (patch)
treea73d53f434e030a46f32b62e1e25d5c2f7070748 /src
parent41b5620492d0a050cbed4c94486ef8d8a190c445 (diff)
util/build-id: define ElfW and NT_GNU_BUILD_ID if needed
Define ElfW() and NT_GNU_BUILD_ID if needed as these defines are not present on at least OpenBSD and FreeBSD. Fixes the build on OpenBSD. Fixes: d4fa083e11f ("util: Add utility build-id code.") Signed-off-by: Jonathan Gray <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/util/build_id.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/build_id.c b/src/util/build_id.c
index 2993a80cfe6..cc0f8527302 100644
--- a/src/util/build_id.c
+++ b/src/util/build_id.c
@@ -28,6 +28,14 @@
#include "build_id.h"
+#ifndef NT_GNU_BUILD_ID
+#define NT_GNU_BUILD_ID 3
+#endif
+
+#ifndef ElfW
+#define ElfW(type) Elf_##type
+#endif
+
#define ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1))
struct build_id_note {