mirror of
https://github.com/thunderbrewhq/bc.git
synced 2025-12-12 01:52:30 +00:00
fix(os): include <unistd.h> when using procfs for OsGetExeName
This commit is contained in:
parent
e58128405c
commit
7878f9233e
1 changed files with 7 additions and 0 deletions
|
|
@ -2,14 +2,21 @@
|
|||
#include "bc/String.hpp"
|
||||
#include "bc/file/Path.hpp"
|
||||
|
||||
// Win32
|
||||
#if defined(WHOA_SYSTEM_WIN)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
// Darwin
|
||||
#if defined(WHOA_SYSTEM_MAC)
|
||||
#include <mach-o/dyld.h>
|
||||
#endif
|
||||
|
||||
// procfs
|
||||
#if defined(WHOA_SYSTEM_LINUX)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
// Get the full path of the currently running .exe/ELF/Mach-O executable
|
||||
void OsGetExeName(char* buffer, size_t chars) {
|
||||
#if defined(WHOA_SYSTEM_WIN)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue