From: Willem Jan Withagen Date: Sun, 18 Feb 2018 13:45:56 +0000 (+0100) Subject: include: compat.h, fix the return result of pthread_set_name() X-Git-Tag: v13.0.2~235^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F20474%2Fhead;p=ceph.git include: compat.h, fix the return result of pthread_set_name() On FreeBSD the function type is void(). Make it compatible with return value on other platforms. Signed-off-by: Willem Jan Withagen --- diff --git a/src/include/compat.h b/src/include/compat.h index 0dad0ea02064..d60e4c3c445c 100644 --- a/src/include/compat.h +++ b/src/include/compat.h @@ -145,8 +145,10 @@ #define ceph_pthread_setname pthread_setname_np #endif #elif defined(HAVE_PTHREAD_SET_NAME_NP) - /* Fix a small name diff */ - #define ceph_pthread_setname pthread_set_name_np + /* Fix a small name diff and return 0 */ + #define ceph_pthread_setname(thread, name) ({ \ + pthread_set_name_np(thread, name); \ + 0; }) #else /* compiler warning free success noop */ #define ceph_pthread_setname(thread, name) ({ \