]> code.delx.au - pulseaudio/blobdiff - src/polyp/context.c
* split pa_cstrerror() into its own file polypcore/core-error.[ch]
[pulseaudio] / src / polyp / context.c
index d5cf90f8eefd565eb8bbc516d940d8b71d916a8b..68fb4bf3e091564234294d1022a599f06a4c642c 100644 (file)
@@ -47,7 +47,9 @@
 
 #include "../polypcore/winsock.h"
 
+#include <polypcore/core-error.h>
 #include <polyp/version.h>
+#include <polyp/xmalloc.h>
 
 #include <polypcore/native-common.h>
 #include <polypcore/pdispatch.h>
@@ -55,8 +57,7 @@
 #include <polypcore/dynarray.h>
 #include <polypcore/socket-client.h>
 #include <polypcore/pstream-util.h>
-#include <polypcore/util.h>
-#include <polypcore/xmalloc.h>
+#include <polypcore/core-util.h>
 #include <polypcore/log.h>
 #include <polypcore/socket-util.h>
 
@@ -440,7 +441,7 @@ static int context_connect_spawn(pa_context *c) {
     pa_context_ref(c);
     
     if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) {
-        pa_log(__FILE__": socketpair() failed: %s", strerror(errno));
+        pa_log(__FILE__": socketpair(): %s", pa_cstrerror(errno));
         pa_context_fail(c, PA_ERR_INTERNAL);
         goto fail;
     }
@@ -454,7 +455,7 @@ static int context_connect_spawn(pa_context *c) {
         c->spawn_api.prefork();
 
     if ((pid = fork()) < 0) {
-        pa_log(__FILE__": fork() failed: %s", strerror(errno));
+        pa_log(__FILE__": fork(): %s", pa_cstrerror(errno));
         pa_context_fail(c, PA_ERR_INTERNAL);
 
         if (c->spawn_api.postfork)
@@ -510,7 +511,7 @@ static int context_connect_spawn(pa_context *c) {
         c->spawn_api.postfork();
         
     if (r < 0) {
-        pa_log(__FILE__": waitpid() failed: %s", strerror(errno));
+        pa_log(__FILE__": waitpid(): %s", pa_cstrerror(errno));
         pa_context_fail(c, PA_ERR_INTERNAL);
         goto fail;
     } else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {