mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1245745 include libpulse version in update URL r=glandium
This commit is contained in:
parent
503543260f
commit
281254ba81
@ -31,6 +31,7 @@
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
#include <gtk/gtk.h>
|
||||
#include <dlfcn.h>
|
||||
#include <unistd.h>
|
||||
#include <fstream>
|
||||
#include "mozilla/Tokenizer.h"
|
||||
@ -702,13 +703,33 @@ nsSystemInfo::Init()
|
||||
gtk_micro_version);
|
||||
}
|
||||
|
||||
nsAutoCString secondaryLibrary;
|
||||
if (gtkver_len > 0) {
|
||||
rv = SetPropertyAsACString(NS_LITERAL_STRING("secondaryLibrary"),
|
||||
nsDependentCSubstring(gtkver, gtkver_len));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
secondaryLibrary.Append(nsDependentCSubstring(gtkver, gtkver_len));
|
||||
}
|
||||
|
||||
void* libpulse = dlopen("libpulse.so.0", RTLD_LAZY);
|
||||
const char* libpulseVersion = "not-available";
|
||||
if (libpulse) {
|
||||
auto pa_get_library_version = reinterpret_cast<const char* (*)()>
|
||||
(dlsym(libpulse, "pa_get_library_version"));
|
||||
|
||||
if (pa_get_library_version) {
|
||||
libpulseVersion = pa_get_library_version();
|
||||
}
|
||||
}
|
||||
|
||||
secondaryLibrary.AppendPrintf(",libpulse %s", libpulseVersion);
|
||||
|
||||
if (libpulse) {
|
||||
dlclose(libpulse);
|
||||
}
|
||||
|
||||
rv = SetPropertyAsACString(NS_LITERAL_STRING("secondaryLibrary"),
|
||||
secondaryLibrary);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
|
Loading…
Reference in New Issue
Block a user