all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#39363: emacs-git version: pthread_setname_np on NetBSD
@ 2020-01-30 23:02 Thomas Klausner
  2020-01-31  7:48 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Klausner @ 2020-01-30 23:02 UTC (permalink / raw)
  To: 39363

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

Hi!

Recently, emacs from git stopped compiling on NetBSD because it
started using pthread_setname_np. AFAIK, there is no commonly agreed
upon standard for this function, and NetBSD's uses three arguments, see
https://netbsd.gw.com/cgi-bin/man-cgi?pthread_setname_np++NetBSD-current

The attached patch makes emacs compile again (on NetBSD-9.99.43/amd64)
but configure should probably be taught to look for that version of
pthread_setname_np instead of the #ifdef __NetBSD__.

Thanks,
 Thomas

[-- Attachment #2: patch-src_systhread.c --]
[-- Type: text/plain, Size: 450 bytes --]

$NetBSD$

Adapt pthread_setname_np calling convention for NetBSD.

--- src/systhread.c.orig	2020-01-30 22:42:52.049505198 +0000
+++ src/systhread.c
@@ -217,7 +217,11 @@ sys_thread_set_name (const char *name)
  #ifdef HAVE_PTHREAD_SETNAME_NP_1ARG
   pthread_setname_np (p_name);
  #else
+  #ifdef __NetBSD__
+  pthread_setname_np (pthread_self (), "%s", p_name);
+  #else
   pthread_setname_np (pthread_self (), p_name);
+  #endif
  #endif
 #endif
 }

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-02-03 15:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-30 23:02 bug#39363: emacs-git version: pthread_setname_np on NetBSD Thomas Klausner
2020-01-31  7:48 ` Eli Zaretskii
2020-01-31  9:02   ` Robert Pluim
2020-01-31 17:09     ` Thomas Klausner
2020-02-03 11:37       ` Robert Pluim
2020-02-03 15:35         ` Eli Zaretskii
2020-02-03 15:41           ` Robert Pluim

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.