Browse Source

Fix `info.init_os_version` on FreeBSD

It's possible for the return string to be longer than 128 characters
these days, so I've increased it to 1024, same as the other BSDs.

SYSCTL was otherwise erring out due to lack of buffer space.
Feoramund 1 year ago
parent
commit
20c32c807d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/sys/info/platform_freebsd.odin

+ 1 - 1
core/sys/info/platform_freebsd.odin

@@ -12,7 +12,7 @@ version_string_buf: [1024]u8
 init_os_version :: proc () {
 	os_version.platform = .FreeBSD
 
-	kernel_version_buf: [129]u8
+	kernel_version_buf: [1024]u8
 
 	b := strings.builder_from_bytes(version_string_buf[:])
 	// Retrieve kernel info using `sysctl`, e.g. FreeBSD 13.1-RELEASE-p2 GENERIC