diff --git a/service/native/include/Common.h b/service/native/include/Common.h deleted file mode 100644 index b5f5f0adbf..0000000000 --- a/service/native/include/Common.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2022 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once -// TODO: deduplicate with the constants in NetdConstants.h. -#include -#include "clat_mark.h" - -using aidl::android::net::INetd; - -static_assert(INetd::CLAT_MARK == CLAT_MARK, "must be 0xDEADC1A7"); diff --git a/service/native/libs/libclat/Android.bp b/service/native/libs/libclat/Android.bp index 996706ee11..5c6b12395d 100644 --- a/service/native/libs/libclat/Android.bp +++ b/service/native/libs/libclat/Android.bp @@ -43,11 +43,15 @@ cc_test { srcs: [ "clatutils_test.cpp", ], + header_libs: [ + "bpf_connectivity_headers", + ], static_libs: [ "libbase", "libclat", "libip_checksum", "libnetd_test_tun_interface", + "netd_aidl_interface-lateststable-ndk", ], shared_libs: [ "liblog", diff --git a/service/native/libs/libclat/clatutils_test.cpp b/service/native/libs/libclat/clatutils_test.cpp index f4f97dbdf9..cf6492fb16 100644 --- a/service/native/libs/libclat/clatutils_test.cpp +++ b/service/native/libs/libclat/clatutils_test.cpp @@ -26,6 +26,10 @@ extern "C" { #include "checksum.h" } +#include +#include "clat_mark.h" +static_assert(aidl::android::net::INetd::CLAT_MARK == CLAT_MARK, "must be 0xDEADC1A7"); + // Default translation parameters. static const char kIPv4LocalAddr[] = "192.0.0.4";