[Bug build/25268] Build broken on macOS at 4da8c3a8a (Oct 13, 2019), which introduced pthread_setname_np()

kryukov at frtk dot ru sourceware-bugzilla@sourceware.org
Wed Dec 18 17:32:00 GMT 2019


https://sourceware.org/bugzilla/show_bug.cgi?id=25268

Pavel I. Kryukov <kryukov at frtk dot ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kryukov at frtk dot ru

--- Comment #6 from Pavel I. Kryukov <kryukov at frtk dot ru> ---
It seems I have another signature of the 'pthread_setname_np'
Mac OS image used by Travis CI. 
Instead of `void (*set_name) (const char *)`, there is
`int (const char * _Nonnull)`, i.e. it returns int.

> gdbsupport/thread-pool.c:142:3: error: no matching function
> for call to 'set_thread_name'
>   set_thread_name (pthread_setname_np, "gdb worker");
>   ^~~~~~~~~~~~~~~
> gdbsupport/thread-pool.c:51:1: note: candidate function
> not viable: no known conversion from 'int (const char * _Nonnull)'
> to 'int (*)(pthread_t, const char *)'
> (aka 'int (*)(_opaque_pthread_t *, const char *)')
> for 1st argument
> set_thread_name (int (*set_name) (pthread_t, const char *), const char *name)
> ^
> gdbsupport/thread-pool.c:57:1: note: candidate function not viable:
> no known conversion from 'int (const char * _Nonnull)'
> to 'void (*)(const char *)' for 1st argument
> set_thread_name (void (*set_name) (const char *), const char *name)
> ^

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list