mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 04:50:29 +00:00
initial OpenBSD support
This commit is contained in:
@@ -17,6 +17,10 @@
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
#if defined(GB_SYSTEM_OPENBSD)
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
NOTE(Jeroen): This prints the Windows product edition only, to be called from `print_platform_details`.
|
||||
*/
|
||||
@@ -643,6 +647,14 @@ void print_bug_report_help() {
|
||||
} else {
|
||||
gb_printf("macOS: Unknown\n");
|
||||
}
|
||||
#elif defined(GB_SYSTEM_OPENBSD)
|
||||
struct utsname un;
|
||||
|
||||
if (uname(&un) != -1) {
|
||||
gb_printf("%s %s %s %s\n", un.sysname, un.release, un.version, un.machine);
|
||||
} else {
|
||||
gb_printf("OpenBSD: Unknown\n");
|
||||
}
|
||||
#else
|
||||
gb_printf("Unknown\n");
|
||||
|
||||
@@ -657,4 +669,4 @@ void print_bug_report_help() {
|
||||
And RAM info.
|
||||
*/
|
||||
report_ram_info();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user