PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
#include <pulse/utf8.h>
#include <pulse/xmalloc.h>
-#include <pulsecore/core-util.h>
-#include <pulsecore/native-common.h>
#include <pulsecore/thread.h>
#include <pulsecore/macro.h>
#include <pulsecore/log.h>
char *translated, *t;
char errbuf[128];
+ if (errnum < 0)
+ errnum = -errnum;
+
if ((t = PA_STATIC_TLS_GET(cstrerror)))
pa_xfree(t);
original = strerror(errnum);
#endif
- if (!original) {
- pa_snprintf(errbuf, sizeof(errbuf), "Unknown error %i", errnum);
+ /* The second condition is a Windows-ism */
+ if (!original || !strcasecmp(original, "Unknown error")) {
+ pa_snprintf(errbuf, sizeof(errbuf), "Unknown error %d", errnum);
original = errbuf;
}