]> git.proxmox.com Git - mirror_zfs.git/commit
Unbreak FreeBSD cross-build on MacOS broken in 051460b8b
authorMartin Matuška <mm@FreeBSD.org>
Thu, 9 May 2024 14:42:51 +0000 (16:42 +0200)
committerGitHub <noreply@github.com>
Thu, 9 May 2024 14:42:51 +0000 (07:42 -0700)
commit414acbd37e0a1121e93310e88956e30554ad1dae
treec64e03a2d231e96d40f93cb53a46718a85b0c519
parent3400127a75fda737bc59ae52f1f8ecedd6201117
Unbreak FreeBSD cross-build on MacOS broken in 051460b8b

MacOS used FreeBSD-compatible getprogname() and pthread_getname_np().
But pthread_getthreadid_np() does not exist on MacOS. This implements
libspl_gettid() using pthread_threadid_np() to get the thread id
of the current thread.

Tested with FreeBSD GitHub actions
freebsd-src/.github/workflows/cross-bootstrap-tools.yml

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Signed-off-by: Martin Matuska <mm@FreeBSD.org>
Closes #16167
lib/libspl/assert.c