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: d4fa083e11 ("util: Add utility build-id code.")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Jonathan Gray
2017-02-18 18:56:58 +11:00
committed by Emil Velikov
parent 41b5620492
commit a042465c21
+8
View File
@@ -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 {