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
--- a/build/moz.configure/headers.configure
+++ b/build/moz.configure/headers.configure
@@ -35,18 +35,23 @@ check_headers(
'sys/statvfs.h',
'sys/statfs.h',
'sys/vfs.h',
'sys/mount.h',
when=non_msvc_compiler,
)
# 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)
# SCTP support - needs various network include headers
check_headers(
'linux/if_addr.h',
'linux/rtnetlink.h',