mirror of
				https://github.com/vlang/v.git
				synced 2023-08-10 21:13:21 +03:00 
			
		
		
		
	os: fix executable on FreeBSD and older C compilers
This commit is contained in:
		| @@ -692,9 +692,9 @@ pub fn executable() string { | ||||
| 	} | ||||
| 	$if freebsd { | ||||
| 		mut result := malloc(MAX_PATH) | ||||
| 		mut mib := [1 /* CTL_KERN */, 14 /* KERN_PROC */, 12 /* KERN_PROC_PATHNAME */, -1]!!  | ||||
| 		mib := [1 /* CTL_KERN */, 14 /* KERN_PROC */, 12 /* KERN_PROC_PATHNAME */, -1]  | ||||
| 		size := MAX_PATH  | ||||
| 		C.sysctl(mib, 4, result, &size, 0, 0)  | ||||
| 		C.sysctl(mib.data, 4, result, &size, 0, 0)  | ||||
| 		return string(result)  | ||||
| 	}  | ||||
| 	$if openbsd { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alexander Medvednikov
					Alexander Medvednikov