Bug 1428182 - 2. Check both quota.h and quotactl(); r=glandium

Android headers can have a <sys/quota.h> header but with its functions
ifdef'ed out. Check for that by checking for the presence of quotactl().

MozReview-Commit-ID: 26ILnbP7flO

--HG--
extra : rebase_source : 147e4be9eb98326fd4946b7b3695c573c7108347
This commit is contained in:
Jim Chen 2018-01-29 17:38:13 -05:00
Родитель 35691135a8
Коммит 9f9eafdcd0
1 изменённых файлов: 7 добавлений и 2 удалений

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

@ -40,8 +40,13 @@ check_headers(
)
# Quota support
check_header('sys/quota.h',
when=non_msvc_compiler)
# Check for both the header and quotactl() because Android headers can have the
# header but not quotactl().
set_define('HAVE_SYS_QUOTA_H',
try_compile(includes=['sys/quota.h'],
body='quotactl(0, nullptr, 0, (caddr_t)nullptr);',
when=non_msvc_compiler,
check_msg='for sys/quota.h'))
check_header('linux/quota.h',
includes=['sys/socket.h'],
when=building_linux)