Fix generated code build error for extension option 94/323994/1
authorjusung son <jusung07.son@samsung.com>
Thu, 8 May 2025 06:24:53 +0000 (15:24 +0900)
committerjusung son <jusung07.son@samsung.com>
Mon, 12 May 2025 05:20:06 +0000 (05:20 +0000)
- Some internal api symbols can be ambiguous.

Change-Id: Ifb5cd302a3476bc1ebe94edfe698e398a0d1a562
Signed-off-by: jusung son <jusung07.son@samsung.com>
(cherry picked from commit 092b8e2921d606f715a556b7541deef393ec29b4)

idlc/gen/version2/c_body_generator_base_cb.hh
idlc/gen/version2/c_stub_body_generator_cb.hh
idlc/gen/version2/cpp_generator_base_cb.hh
idlc/gen/version2/cpp_stub_body_generator_cb.hh

index 66f2a94e3fd858022dad7d10ce142ff5358a3cc8..611f55d786e37ab5315c7c07ee522a5547d90a18 100644 (file)
@@ -1278,7 +1278,7 @@ R"__cpp_cb(
 
 typedef int (*rpc_port_get_peer_info_t)(rpc_port_h h, pid_t* pid, uid_t* uid);
 
-static rpc_port_get_peer_info_t rpc_port_get_peer_info;
+static rpc_port_get_peer_info_t dl_rpc_port_get_peer_info;
 
 static bool rpc_port_internal_loaded;
 
@@ -1287,9 +1287,9 @@ static void rpc_port_internal_init(void)
     if (rpc_port_internal_loaded)
       return;
 
-    const char * symbol = "rpc_port_get_peer_info";
-    rpc_port_get_peer_info = dlsym(RTLD_DEFAULT, symbol);
-    if (rpc_port_get_peer_info == nullptr) {
+    const char* symbol = "rpc_port_get_peer_info";
+    dl_rpc_port_get_peer_info = dlsym(RTLD_DEFAULT, symbol);
+    if (dl_rpc_port_get_peer_info == nullptr) {
       _E("Failed to find symbol(%s). Please check rpc-port version", symbol);
       return;
     }
index 52477717a555ecf0a444cf96b6d0929b8be4d7ee..86a6631407566615a7d44686d9f5b890f69d499b 100644 (file)
@@ -1744,7 +1744,7 @@ pid_t pid;
 if (ARRAY_SIZE(privileges) < 1)
   return RPC_PORT_ERROR_NONE;
 
-ret = rpc_port_get_peer_info(h->port, &pid, &uid);
+ret = dl_rpc_port_get_peer_info(h->port, &pid, &uid);
 if (ret == RPC_PORT_ERROR_NONE && uid < REGULAR_UID_MIN) {
   _W("Bypass access control. pid(%d), uid(%u)", pid, uid);
   return RPC_PORT_ERROR_NONE;
index 599190746051ea4925c9957b66e699c47456fb3b..7e13aa07353f27d64cb0f7b1d4c5772ce622eea9 100644 (file)
@@ -1040,15 +1040,15 @@ constexpr const char CB_RPC_PORT_INTERNAL_APIS[] =
 R"__cpp_cb(
 using rpc_port_get_peer_info_t = int (*)(rpc_port_h h, pid_t* pid, uid_t* uid);
 
-rpc_port_get_peer_info_t rpc_port_get_peer_info;
+rpc_port_get_peer_info_t dl_rpc_port_get_peer_info;
 
 class RpcPortInternals {
  public:
   RpcPortInternals() {
     std::string symbol = "rpc_port_get_peer_info";
-    rpc_port_get_peer_info = reinterpret_cast<rpc_port_get_peer_info_t>(
+    dl_rpc_port_get_peer_info = reinterpret_cast<rpc_port_get_peer_info_t>(
     dlsym(RTLD_DEFAULT, symbol.c_str()));
-    if (rpc_port_get_peer_info == nullptr) {
+    if (dl_rpc_port_get_peer_info == nullptr) {
       _E("Failed to find symbol(%s). Please check rpc-port version", symbol.c_str());
       return;
     }
index 97234c1ebb9e57d1f66a976007d0ba230f9aa458..76325f21bd3046e61080d0f28482c7598fe12ce5 100644 (file)
@@ -260,7 +260,7 @@ bool <CLS_NAME>::ServiceBase::CheckPrivileges(rpc_port_h port, int method_id) {
   if (found == privilege_map_.end())
     return true;
 
-  ret = rpc_port_get_peer_info(port, &pid, &uid);
+  ret = dl_rpc_port_get_peer_info(port, &pid, &uid);
   if(ret == RPC_PORT_ERROR_NONE && uid < kRegularUidMin) {
     _W("Bypass access control. pid(%d), uid(%u)", pid, uid);
     return true;