mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
core-util: move personality resetting into core-util
This commit is contained in:
parent
9f53aa5546
commit
ef176ecb62
3 changed files with 16 additions and 9 deletions
|
|
@ -101,6 +101,10 @@
|
|||
#include "rtkit.h"
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#include <sys/personality.h>
|
||||
#endif
|
||||
|
||||
#include <pulse/xmalloc.h>
|
||||
#include <pulse/util.h>
|
||||
#include <pulse/utf8.h>
|
||||
|
|
@ -2855,3 +2859,12 @@ size_t pa_pipe_buf(int fd) {
|
|||
return 4096;
|
||||
#endif
|
||||
}
|
||||
|
||||
void pa_reset_personality(void) {
|
||||
|
||||
#ifdef __linux__
|
||||
if (personality(PER_LINUX) < 0)
|
||||
pa_log_warn("Uh, personality() failed: %s", pa_cstrerror(errno));
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -241,4 +241,6 @@ char* pa_maybe_prefix_path(const char *path, const char *prefix);
|
|||
/* Returns size of the specified pipe or 4096 on failure */
|
||||
size_t pa_pipe_buf(int fd);
|
||||
|
||||
void pa_reset_personality(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue