[libomptarget][amdgpu] don't declare Elf_Note on FreeBSD
authorDimitry Andric <dimitry@andric.com>
Fri, 6 Aug 2021 19:06:08 +0000 (21:06 +0200)
committerDimitry Andric <dimitry@andric.com>
Fri, 6 Aug 2021 19:45:26 +0000 (21:45 +0200)
commit71ae2e0221a99958ed82175781d92a73ea05597c
tree529b4ac2a2d189bc8233cae900f52ccace834136
parent5b9a94414eb93e526ed507d5144ca71bc8f63fb2
[libomptarget][amdgpu] don't declare Elf_Note on FreeBSD

On FreeBSD, the system `<libelf.h>` already declares `struct Elf_Note`
indirectly (via `<sys/elf_common.h>`). This results in compile errors
when building the libomptarget amdgpu plugin. Avoid redeclaring `struct
Elf_Note` on FreeBSD to fix the errors.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D107661
openmp/libomptarget/plugins/amdgpu/impl/system.cpp