diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbsupport/thread-pool.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 53885e1..8e38ada 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2019-12-18 Tom Tromey <tromey@adacore.com> + + PR build/25268: + * gdbsupport/thread-pool.c (set_thread_name): Expect "int" return + type on macOS. Add comment. + 2019-12-18 Simon Marchi <simon.marchi@efficios.com> * c-lang.c (c_get_string, asm_language_defn): Remove space diff --git a/gdb/gdbsupport/thread-pool.c b/gdb/gdbsupport/thread-pool.c index cd54895..a8c5fb7 100644 --- a/gdb/gdbsupport/thread-pool.c +++ b/gdb/gdbsupport/thread-pool.c @@ -49,8 +49,10 @@ set_thread_name (int (*set_name) (pthread_t, const char *), const char *name) set_name (pthread_self (), name); } +/* The macOS man page says that pthread_setname_np returns "void", but + the headers actually declare it returning "int". */ ATTRIBUTE_UNUSED static void -set_thread_name (void (*set_name) (const char *), const char *name) +set_thread_name (int (*set_name) (const char *), const char *name) { set_name (name); } |