Bug 1428182 - 7. Include <link.h> in LUL for Android; r=jseward

Modern NDK headers all have <link.h>, so we should always include it,
and still provide shims for anything we need that's not defined in
<link.h>.

MozReview-Commit-ID: GNBDIe73RFm

--HG--
extra : rebase_source : f1f2eddc73dc1accb3a1eb8445600b015e9e7d52
This commit is contained in:
Jim Chen 2018-01-29 17:38:14 -05:00
Родитель 1befc583c9
Коммит 80635d981e
1 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -54,6 +54,7 @@
// (derived from)
// elfutils.h: Utilities for dealing with ELF files.
//
#include <link.h>
#if defined(GP_OS_android)
@ -75,17 +76,12 @@
#define NT_GNU_BUILD_ID 3
#endif
#ifndef ElfW
#define ElfW(type) _ElfW (Elf, ELFSIZE, type)
#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t)
#define _ElfW_1(e,w,t) e##w##t
#endif
//FIXME
extern "C" {
extern char* basename(const char* path);
};
#else
# include <link.h>
#endif