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

Change-Id: Ifb5cd302a3476bc1ebe94edfe698e398a0d1a562
Signed-off-by: jusung son <jusung07.son@samsung.com>
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 b8d679bac658e74515a0517f00214d8d6b459b29..66039fe68fbb90c1dac4ddcd4e369fba52d02d03 100644 (file)
@@ -1745,7 +1745,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 205b3e92739dc91fb57b176c5d30cbff85467d39..ff7f1266713f158784c976f287270ba87a83675c 100644 (file)
@@ -1041,15 +1041,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 78a156a76e652f3869925e8eda50e56fb924a3c3..c762f629a34868899964cfdd5fe0b327d76e62ce 100644 (file)
@@ -262,7 +262,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;