summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/core-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-08-12 21:36:52 +0200
committerLennart Poettering <lennart@poettering.net>2009-08-12 21:36:52 +0200
commitef176ecb62a8f04bd14ca37e7c2a40469f0bb8ba (patch)
treef4a0d842ca45fd786e4d3cd326b9c8b72fcba160 /src/pulsecore/core-util.c
parent9f53aa5546e7bf9246546c6dda5637d50679483c (diff)
core-util: move personality resetting into core-util
Diffstat (limited to 'src/pulsecore/core-util.c')
-rw-r--r--src/pulsecore/core-util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index d4baf697..6494244e 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -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
+
+}