Fix clang compilation errors in libelf.
Remove use of VLA inside a union/struct. Replace nested functions with
local static functions.
Fixes:
third_party/elfutils/src/libelf/elf32_updatefile.c:294:4: error: function definition is not allowed here
third_party/elfutils/src/libelf/elf32_updatefile.c:328:7: error: implicit declaration of function 'fill_mmap' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
third_party/elfutils/src/libelf/elf_getarsym.c:201:15: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
third_party/elfutils/src/libelf/elf_getarsym.c:202:15: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
third_party/elfutils/src/libelf/elf_begin.c:1015:3: error: function definition is not allowed here
third_party/elfutils/src/libelf/elf_begin.c:1047:11: error: implicit declaration of function 'lock_dup_elf' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
BUG=385553
R=rmcilroy@chromium.org
Review URL: https://codereview.appspot.com/106240043
3 files changed