Create backport branch for some apr 1.2 compatibility fixes

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/1.8.x-apr-1.2@1701234 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/subversion/include/private/svn_dep_compat.h b/subversion/include/private/svn_dep_compat.h
index 108b67c..097cca1 100644
--- a/subversion/include/private/svn_dep_compat.h
+++ b/subversion/include/private/svn_dep_compat.h
@@ -73,6 +73,12 @@
  * apr_hash_clear() API.
  */
 #define apr_hash_clear(ht)           svn_hash__clear(ht)
+
+/**
+ * If we don't have a recent enough APR, emulate the behavior of the
+ * apr_array_clear() API.
+ */
+#define apr_array_clear(arr) do { arr->nelts = 0; } while(0)
 #endif
 
 #if !APR_VERSION_AT_LEAST(1,0,0)
diff --git a/subversion/tests/libsvn_repos/repos-test.c b/subversion/tests/libsvn_repos/repos-test.c
index f8a844e..1589a60 100644
--- a/subversion/tests/libsvn_repos/repos-test.c
+++ b/subversion/tests/libsvn_repos/repos-test.c
@@ -37,6 +37,8 @@
 #include "svn_props.h"
 #include "svn_version.h"
 
+#include "svn_dep_compat.h"
+
 #include "../svn_test_fs.h"
 
 #include "dir-delta-editor.h"