Skip to content

Commit

Permalink
macOS: Always create lowercase hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesLorenz committed Dec 3, 2023
1 parent 1b74e72 commit d6c8316
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,11 @@ void lo_server_resolve_hostname(lo_server s)
}

s->hostname = strdup(hostname);
#ifdef __APPLE__
/* On macOS, capital hostnames cause issues in DNS resolving */
for (const char* p = s->hostname; *p; ++p)
*p = tolower(*p);
#endif
}

#if defined(WIN32) || defined(_MSC_VER) || defined(HAVE_GETIFADDRS)
Expand Down

0 comments on commit d6c8316

Please sign in to comment.