Skip to content

Commit

Permalink
libmpathcmd: reinstate ABI 1.0.0
Browse files Browse the repository at this point in the history
__mpath_connect() was part of our public ABI. Instead of removing
it completely, define it as a weak alias of the new mpath_connect__().
This way, programs linked against previous versions of libmpathcmd
will continue to work.

This shouldn't interfere with general symbol naming rules, as a weak
symbol won't override a library symbol of the same name.

Signed-off-by: Martin Wilck <[email protected]>
  • Loading branch information
mwilck committed Aug 12, 2024
1 parent 563ad90 commit eeb1dc5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 8 additions & 4 deletions libmpathcmd/libmpathcmd.version
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,20 @@
*
* See libmultipath.version for general policy about version numbers.
*/
LIBMPATHCMD_2.0.0 {

LIBMPATHCMD_1.0.0 {
global:
mpath_connect;
mpath_connect__;
__mpath_connect;
mpath_disconnect;
mpath_process_cmd;
mpath_recv_reply;
mpath_recv_reply_len;
mpath_recv_reply_data;
mpath_send_cmd;
local:
*;
};

LIBMPATHCMD_1.1.0 {
global:
mpath_connect__;
} LIBMPATHCMD_1.0.0;
3 changes: 3 additions & 0 deletions libmpathcmd/mpath_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ int mpath_connect__(int nonblocking)
return fd;
}

extern int __mpath_connect(int)
__attribute__((weak, alias("mpath_connect__")));

/*
* connect to a unix domain socket
*/
Expand Down

0 comments on commit eeb1dc5

Please sign in to comment.