Upgrade expat to R_2_2_10

(Keeping the `#if defined(__BIONIC__)` around the HAVE_SYSCALL_GETRANDOM
define, which got dropped somehow.)

Test: make
Change-Id: I3a26a4ff32a2e6b53eb519f1ae09839f24b826d7
diff --git a/conftools/ax-check-compile-flag.m4 b/conftools/ax-check-compile-flag.m4
index ca36397..172e296 100644
--- a/conftools/ax-check-compile-flag.m4
+++ b/conftools/ax-check-compile-flag.m4
@@ -8,8 +8,8 @@
 #
 # DESCRIPTION
 #
-#   Check whether the given FLAG works with the current language's compiler
-#   or gives an error.  (Warnings, however, are ignored)
+#   Check whether the given FLAG plus -Werror works with the current
+#   language's compiler — C or C++ — or gives an error.
 #
 #   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
 #   success/failure.
@@ -28,6 +28,7 @@
 #
 #   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
 #   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#   Copyright (c) 2020 Sebastian Pipping <sebastian@pipping.org>
 #
 #   This program is free software: you can redistribute it and/or modify it
 #   under the terms of the GNU General Public License as published by the
@@ -55,15 +56,17 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 4
+#serial 6
 
 AC_DEFUN([AX_CHECK_COMPILE_FLAG],
 [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
 AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
 AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
   ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
-  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
-  AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 -Werror $1"
+  AC_COMPILE_IFELSE([m4_default([$5],
+                                [AC_LANG_SOURCE(
+                                   [[int main(void) { return 0; }]])])],
     [AS_VAR_SET(CACHEVAR,[yes])],
     [AS_VAR_SET(CACHEVAR,[no])])
   _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])