Skip to content

Hook same method name for different library module #10

@hqt

Description

@hqt

For example I want to hook a method named hook_method in two module liba and libb

int hook_method(void *ctx);
HOOK_INFO custom_hook_info_hook_method={{}, "liba", "hook_method", hook_method, hook_method};
HOOK_INFO custom_hook_info_hook_method={{}, "libb", "hook_method", hook_method, hook_method};

But when compiling, I will meet error:

note: previous definition of 'custom_hook_info_hook_method'

So how can I hook same method name for two different libraries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions