From 99091451fed10d609185c88dbec40485cf0fbd4e Mon Sep 17 00:00:00 2001 From: "vipox@qq.com" Date: Tue, 21 Mar 2023 09:33:04 +0800 Subject: [PATCH] gnss: fix build error: redefinition of 'GnssVendorInterface' as different kind of symbol vendorGnssAdapter.so need a global struct variable named 'GnssVendorInterface' for dlsym to obtain the entry, but the name was previous defined in location_vendor_lib.h by typedef, so we use a new variable name to avoid redefinition error. Signed-off-by: vipox@qq.com Change-Id: Ibcb834b2ef536b940821f96f6692fe8c501083f1 --- location/gnss/hdi_service/location_vendor_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/location/gnss/hdi_service/location_vendor_interface.cpp b/location/gnss/hdi_service/location_vendor_interface.cpp index 6c98455fdc..f18e61ef09 100644 --- a/location/gnss/hdi_service/location_vendor_interface.cpp +++ b/location/gnss/hdi_service/location_vendor_interface.cpp @@ -70,7 +70,7 @@ void LocationVendorInterface::Init() HDF_LOGE("%{public}s:dlopen %{public}s failed: %{public}s", __func__, VENDOR_NAME.c_str(), dlerror()); return; } - GnssVendorDevice *gnssDevice = static_cast(dlsym(vendorHandle_, "GnssVendorInterface")); + GnssVendorDevice *gnssDevice = static_cast(dlsym(vendorHandle_, "GnssVendorEntry")); if (gnssDevice == nullptr) { HDF_LOGE("%{public}s:dlsym GnssInterface failed.", __func__); return; -- Gitee