Merge AOSP android-9.0.0_r3

Fix conflicts and make it build in 5.1, 6.0, 7.1, 8.1, and 9.0

Change-Id: Ida0a64c29ff27d339b7f42a18d820930964ac6e4
diff --git a/libtar/block.c b/libtar/block.c
index d0adb2b..834c164 100644
--- a/libtar/block.c
+++ b/libtar/block.c
@@ -357,7 +357,8 @@
 				if (*start == '2')
 				{
 					start++;
-					if (start + sizeof(struct ext4_encryption_policy) != '\n')
+					char *newline_check = start + sizeof(struct ext4_encryption_policy);
+					if (*newline_check != '\n')
 						printf("did not find newline char in expected location, continuing anyway...\n");
 					memcpy(t->th_buf.eep, start, sizeof(struct ext4_encryption_policy));
 #ifdef DEBUG