From: Philippe Proulx Date: Sat, 29 Oct 2016 17:32:57 +0000 (-0400) Subject: Fix: lttng-ust-elf.c: define NT_GNU_BUILD_ID if not defined X-Git-Tag: v2.10.0-rc2~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=71bf0951cf63dbd51058fc23700bf3742017fa29;p=lttng-ust.git Fix: lttng-ust-elf.c: define NT_GNU_BUILD_ID if not defined On uClibc, NT_GNU_BUILD_ID is not defined, so we define it manually in this case. This definition is the number given to the .note.gnu.build-id section (of type SHT_NOTE) of a linked ELF object. The ELF note headers give name "GNU" and type 3 (NT_GNU_BUILD_ID) for a build ID note, of which there can be only one in a linked object [...] See http://fedoraproject.org/wiki/RolandMcGrath/BuildID Signed-off-by: Philippe Proulx Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/lttng-ust-elf.c b/liblttng-ust/lttng-ust-elf.c index 663699b7..a496841a 100644 --- a/liblttng-ust/lttng-ust-elf.c +++ b/liblttng-ust/lttng-ust-elf.c @@ -31,6 +31,10 @@ #define BUF_LEN 4096 +#ifndef NT_GNU_BUILD_ID +# define NT_GNU_BUILD_ID 3 +#endif + /* * Retrieve the nth (where n is the `index` argument) phdr (program * header) from the given elf instance.