13
0

Fix Windows builds (uname is POSIX only)

This commit is contained in:
Robin Gareus 2022-10-21 17:09:48 +02:00
parent 5d7b421a0b
commit 7fb82690bd
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -58,8 +58,10 @@ struct ping_call {
/* As of October 2022, Ardour only sends system (OS) name */
#ifdef PLATFORM_WINDOWS
static std::string
build_windows_query_string (ArdourCurl::HttpGet const & h)
build__query_string (ArdourCurl::HttpGet const & h)
{
# if ( defined(__x86_64__) || defined(_M_X64) )
return "s=Windows64";
@ -68,8 +70,10 @@ build_windows_query_string (ArdourCurl::HttpGet const & h)
# endif
}
#else /* POSIX: use uname */
static std::string
build_posix_query_string (ArdourCurl::HttpGet const & h)
build_query_string (ArdourCurl::HttpGet const & h)
{
string qs;
struct utsname utb;
@ -87,7 +91,8 @@ build_posix_query_string (ArdourCurl::HttpGet const & h)
return qs;
}
#endif
#endif // ! Windows
#endif // ! MIXBUS
static void*
_pingback (void *arg)
@ -120,11 +125,7 @@ _pingback (void *arg)
url += v;
h.free (v);
#ifdef PLATFORM_WINDOWS
qs = build_windows_query_string (h);
#else
qs = build_posix_query_string (h);
#endif
qs = build_query_string (h);
if (qs.empty()) {
delete cm;