mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
Don't call prctl() on FreeBSD.
This commit is contained in:
parent
0a21c61ed0
commit
feb9a4b9e1
1 changed files with 4 additions and 0 deletions
|
|
@ -29,7 +29,9 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#ifndef __FreeBSD__
|
||||||
#include <sys/prctl.h>
|
#include <sys/prctl.h>
|
||||||
|
#endif
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
@ -436,8 +438,10 @@ const char *pw_get_prgname(void)
|
||||||
static char tcomm[16 + 1];
|
static char tcomm[16 + 1];
|
||||||
spa_zero(tcomm);
|
spa_zero(tcomm);
|
||||||
|
|
||||||
|
#ifndef __FreeBSD__
|
||||||
if (prctl(PR_GET_NAME, (unsigned long) tcomm, 0, 0, 0) == 0)
|
if (prctl(PR_GET_NAME, (unsigned long) tcomm, 0, 0, 0) == 0)
|
||||||
return tcomm;
|
return tcomm;
|
||||||
|
#endif
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue