Identifiers starting with double underscore are forbidden, see https://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> --- libmpathcmd/libmpathcmd.version | 4 ++-- libmpathcmd/mpath_cmd.c | 4 ++-- libmpathcmd/mpath_cmd.h | 2 +- libmultipath/valid.c | 2 +- tests/valid.c | 12 ++++++------ 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libmpathcmd/libmpathcmd.version b/libmpathcmd/libmpathcmd.version index f100628..a786c25 100644 --- a/libmpathcmd/libmpathcmd.version +++ b/libmpathcmd/libmpathcmd.version @@ -10,10 +10,10 @@ * * See libmultipath.version for general policy about version numbers. */ -LIBMPATHCMD_1.0.0 { +LIBMPATHCMD_2.0.0 { global: - __mpath_connect; mpath_connect; + mpath_connect__; mpath_disconnect; mpath_process_cmd; mpath_recv_reply; diff --git a/libmpathcmd/mpath_cmd.c b/libmpathcmd/mpath_cmd.c index d7c3371..1fa036c 100644 --- a/libmpathcmd/mpath_cmd.c +++ b/libmpathcmd/mpath_cmd.c @@ -94,7 +94,7 @@ static size_t write_all(int fd, const void *buf, size_t len) /* * connect to a unix domain socket */ -int __mpath_connect(int nonblocking) +int mpath_connect__(int nonblocking) { int fd; size_t len; @@ -138,7 +138,7 @@ int __mpath_connect(int nonblocking) */ int mpath_connect(void) { - return __mpath_connect(0); + return mpath_connect__(0); } int mpath_disconnect(int fd) diff --git a/libmpathcmd/mpath_cmd.h b/libmpathcmd/mpath_cmd.h index b58aaac..bf30c1e 100644 --- a/libmpathcmd/mpath_cmd.h +++ b/libmpathcmd/mpath_cmd.h @@ -47,7 +47,7 @@ extern "C" { * RETURNS: * A file descriptor on success. -1 on failure (with errno set). */ -int __mpath_connect(int nonblocking); +int mpath_connect__(int nonblocking); /* * DESCRIPTION: diff --git a/libmultipath/valid.c b/libmultipath/valid.c index b7e0cc9..d751780 100644 --- a/libmultipath/valid.c +++ b/libmultipath/valid.c @@ -315,7 +315,7 @@ is_path_valid(const char *name, struct config *conf, struct path *pp, } if (check_multipathd) { - fd = __mpath_connect(1); + fd = mpath_connect__(1); if (fd < 0) { if (errno != EAGAIN) { condlog(3, "multipathd not running"); diff --git a/tests/valid.c b/tests/valid.c index ecaeb46..cb56734 100644 --- a/tests/valid.c +++ b/tests/valid.c @@ -52,7 +52,7 @@ bool __wrap_sysfs_is_multipathed(struct path *pp, bool set_wwid) return is_multipathed; } -int __wrap___mpath_connect(int nonblocking) +int __wrap_mpath_connect__(int nonblocking) { bool connected = mock_type(bool); assert_int_equal(nonblocking, 1); @@ -223,10 +223,10 @@ static void setup_passing(char *name, char *wwid, unsigned int check_multipathd, if (stage == STAGE_IS_MULTIPATHED) return; if (check_multipathd == CHECK_MPATHD_RUNNING) - will_return(__wrap___mpath_connect, true); + will_return(__wrap_mpath_connect__, true); else if (check_multipathd == CHECK_MPATHD_EAGAIN) { - will_return(__wrap___mpath_connect, false); - will_return(__wrap___mpath_connect, EAGAIN); + will_return(__wrap_mpath_connect__, false); + will_return(__wrap_mpath_connect__, EAGAIN); } /* nothing for CHECK_MPATHD_SKIP */ @@ -332,8 +332,8 @@ static void test_check_multipathd(void **state) conf.find_multipaths = FIND_MULTIPATHS_STRICT; /* test failed check to see if multipathd is active */ will_return(__wrap_sysfs_is_multipathed, false); - will_return(__wrap___mpath_connect, false); - will_return(__wrap___mpath_connect, ECONNREFUSED); + will_return(__wrap_mpath_connect__, false); + will_return(__wrap_mpath_connect__, ECONNREFUSED); assert_int_equal(is_path_valid(name, &conf, &pp, true), PATH_IS_NOT_VALID); -- 2.46.0