bpfloader: Android V requires kernel 4.19+ am: 6002cbedb1 am: abc8303ffe am: 5070df963d am: c04c69fed3

Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/2657155

Change-Id: I363e2ad148bf2d9ca56c8db72e4567c0a56bb853
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/bpfloader/BpfLoader.cpp b/bpfloader/BpfLoader.cpp
index fe51ed5..e1dbd06 100644
--- a/bpfloader/BpfLoader.cpp
+++ b/bpfloader/BpfLoader.cpp
@@ -251,6 +251,11 @@
     (void)argc;
     android::base::InitLogging(argv, &android::base::KernelLogger);
 
+    if (!android::bpf::isAtLeastKernelVersion(4, 19, 0)) {
+        ALOGE("Android V requires kernel 4.19.");
+        return 1;
+    }
+
     // Ensure we can determine the Android build type.
     if (!android::bpf::isEng() && !android::bpf::isUser() && !android::bpf::isUserdebug()) {
         ALOGE("Failed to determine the build type: got %s, want 'eng', 'user', or 'userdebug'",