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/String.hpp"
|
||||||
#include "bc/file/Path.hpp"
|
#include "bc/file/Path.hpp"
|
||||||
|
|
||||||
|
// Win32
|
||||||
#if defined(WHOA_SYSTEM_WIN)
|
#if defined(WHOA_SYSTEM_WIN)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Darwin
|
||||||
#if defined(WHOA_SYSTEM_MAC)
|
#if defined(WHOA_SYSTEM_MAC)
|
||||||
#include <mach-o/dyld.h>
|
#include <mach-o/dyld.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// procfs
|
||||||
|
#if defined(WHOA_SYSTEM_LINUX)
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
// Get the full path of the currently running .exe/ELF/Mach-O executable
|
// Get the full path of the currently running .exe/ELF/Mach-O executable
|
||||||
void OsGetExeName(char* buffer, size_t chars) {
|
void OsGetExeName(char* buffer, size_t chars) {
|
||||||
#if defined(WHOA_SYSTEM_WIN)
|
#if defined(WHOA_SYSTEM_WIN)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue