From b9e282f0e3eed2cacf1aac0853dc6607053607a3 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 11 Mar 2020 22:41:29 +0800 Subject: [PATCH] admin/build-doc: use "ceph" for prefix of functions defined by libcephfs if some python module tries to `import cephfs`, it should not fail. Signed-off-by: Kefu Chai --- admin/build-doc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/admin/build-doc b/admin/build-doc index 930e2768ee3..289a2a68871 100755 --- a/admin/build-doc +++ b/admin/build-doc @@ -93,7 +93,12 @@ for bind in rados rbd cephfs rgw; do if [ ! -e $lib_fn ]; then lib_fn=$vdir/lib/python*/*-packages/${bind}.so fi - nm $lib_fn | grep -E "U (lib)?${bind}" | \ + if [ ${bind} = "cephfs" ]; then + func_prefix="ceph" + else + func_prefix="(lib)?${bind}" + fi + nm $lib_fn | grep -E "U ${func_prefix}" | \ awk '{ print "void "$2"(void) {}" }' | \ gcc -shared -o $vdir/lib/lib${bind}.so.1 -xc - if [ ${bind} != rados ]; then -- 2.39.5