Skip to content

Commit

Permalink
Merge pull request #2622 from rgriebl/rgriebl-patch-macos
Browse files Browse the repository at this point in the history
Add support for macOS to the OS detection
  • Loading branch information
allinurl committed Jan 31, 2024
2 parents f2043ee + 69e06a8 commit 62f80fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/opesys.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ static const char *os[][2] = {
{"AppleTV", "iOS"},
{"iTunes", "macOS"},
{"OS X", "macOS"},
{"macOS", "macOS"},
{"Darwin", "Darwin"},

{"Debian", "Linux"},
Expand Down Expand Up @@ -379,7 +380,7 @@ parse_os (char *str, char *tkn, char *os_type, int idx) {
if (strstr (tkn, "iPhone"))
return xstrdup (parse_ios (tkn, 6));
/* Mac OS X */
if ((strstr (tkn, "OS X")) != NULL) {
if (strstr (tkn, "OS X") || strstr (tkn, "macOS")) {
tkn = parse_osx (tkn);
return conf.real_os ? get_real_mac_osx (tkn) : xstrdup (tkn);
}
Expand Down

0 comments on commit 62f80fe

Please sign in to comment.