diff options
| author | Jan Beich <jbeich@FreeBSD.org> | 2021-01-19 14:49:43 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-01-23 09:16:40 +0000 |
| commit | 9b09049c1ccfe70cfdadb1de92c0115b283f986d (patch) | |
| tree | 85abba45423574835650e72c03469f6ad13055cc /render.h | |
| parent | shm: unbreak build without memfd_create (diff) | |
render: set thread name in a portable way
prctl is Linux-only but pthread_setname_np is same as PR_SET_NAME.
Solaris and FreeBSD >= 13 have pthread_setname_np similar to Linux.
DragonFly, OpenBSD, FreeBSD < 13 lack pthread_setname_np but provide
pthread_set_name_np which doesn't return a value. NetBSD requires 3
arguments for pthread_setname_np where the last one is void *.
render.c:8:10: fatal error: 'sys/prctl.h' file not found
#include <sys/prctl.h>
^~~~~~~~~~~~~
render.c:1234:9: error: implicit declaration of function 'prctl' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (prctl(PR_SET_NAME, proc_title, 0, 0, 0) < 0)
^
render.c:1234:15: error: use of undeclared identifier 'PR_SET_NAME'
if (prctl(PR_SET_NAME, proc_title, 0, 0, 0) < 0)
^
Diffstat (limited to 'render.h')
0 files changed, 0 insertions, 0 deletions
