commit | 2129040ae4b44d4f34dbe5c0462472eb86bb73fa | [log] [tgz] |
---|---|---|
author | Maciej Żenczykowski <maze@google.com> | Thu May 25 12:30:22 2023 +0000 |
committer | Maciej Żenczykowski <maze@google.com> | Thu May 25 12:30:52 2023 +0000 |
tree | 570561f941ecfcfb67d42f29f207e9ddd716c37b | |
parent | 8b39bca6551edf6853887179a72fd28ed6431608 [diff] |
KernelUtils.h - better static assert messages for impossible conditions per Lorenzo's request during cherrypick to udc-dev on https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/libs/net/+/23391171 Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Ib19f5b3b63a6978ac5a72b2be08a2f0ba6cdd712
diff --git a/staticlibs/native/bpf_headers/include/bpf/KernelUtils.h b/staticlibs/native/bpf_headers/include/bpf/KernelUtils.h index 769ec4b..59257b8 100644 --- a/staticlibs/native/bpf_headers/include/bpf/KernelUtils.h +++ b/staticlibs/native/bpf_headers/include/bpf/KernelUtils.h
@@ -57,11 +57,11 @@ } #if defined(__LP64__) -static_assert(isUserspace64bit(), "huh?"); +static_assert(isUserspace64bit(), "huh? LP64 must have 64-bit userspace"); #elif defined(__ILP32__) -static_assert(isUserspace32bit(), "huh?"); +static_assert(isUserspace32bit(), "huh? ILP32 must have 32-bit userspace"); #else -#error "huh?" +#error "huh? must be either LP64 (64-bit userspace) or ILP32 (32-bit userspace)" #endif static_assert(isUserspace32bit() || isUserspace64bit(), "must be either 32 or 64 bit");