mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
include build and runtime host information in debug output
This commit is contained in:
parent
fb837f0cac
commit
33d349dcbb
3 changed files with 17 additions and 3 deletions
|
|
@ -42,6 +42,7 @@
|
|||
#include <dirent.h>
|
||||
#include <regex.h>
|
||||
#include <langinfo.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
#ifdef HAVE_STRTOF_L
|
||||
#include <locale.h>
|
||||
|
|
@ -2445,5 +2446,12 @@ char *pa_machine_id(void) {
|
|||
/* If no hostname was set we use the POSIX hostid. It's usually
|
||||
* the IPv4 address. Mit not be that stable. */
|
||||
return pa_sprintf_malloc("%08lx", (unsigned long) gethostid);
|
||||
|
||||
}
|
||||
|
||||
char *pa_uname_string(void) {
|
||||
struct utsname u;
|
||||
|
||||
pa_assert_se(uname(&u) == 0);
|
||||
|
||||
return pa_sprintf_malloc("%s %s %s %s", u.sysname, u.machine, u.release, u.version);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,5 +191,6 @@ pa_bool_t pa_in_system_mode(void);
|
|||
#define pa_streq(a,b) (!strcmp((a),(b)))
|
||||
|
||||
char *pa_machine_id(void);
|
||||
char *pa_uname_string(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue