]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
include: compat.h, fix the return result of pthread_set_name() 20474/head
authorWillem Jan Withagen <wjw@digiware.nl>
Sun, 18 Feb 2018 13:45:56 +0000 (14:45 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Sun, 18 Feb 2018 13:45:56 +0000 (14:45 +0100)
On FreeBSD the function type is void(). Make it compatible with return
value on other platforms.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/include/compat.h

index 0dad0ea02064a10010b87fee47302e9843a8bdf8..d60e4c3c445cfd0c1f0122c40b793c8cbab08228 100644 (file)
     #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) ({ \