mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-22 19:23:31 +00:00
Fixed #include for FreeBSD/MacOS
This commit is contained in:
@@ -36,10 +36,13 @@ limitations under the License.
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#if !defined( __APPLE__) && !defined(_FREEBSD)
|
#if !defined( __APPLE__) && !defined(_FREEBSD)
|
||||||
#include <pty.h>
|
#include <pty.h>
|
||||||
|
#else
|
||||||
|
#include <util.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define CONSOLE_SCREEN_WIDTH 80
|
#define CONSOLE_SCREEN_WIDTH 80
|
||||||
#define CONSOLE_SCREEN_HEIGHT 25
|
#define CONSOLE_SCREEN_HEIGHT 25
|
||||||
|
|
||||||
@@ -895,12 +898,8 @@ ILibProcessPipe_Process ILibProcessPipe_Manager_SpawnProcessEx4(ILibProcessPipe_
|
|||||||
if (userToken != NULL) { CloseHandle(userToken); userToken = NULL; }
|
if (userToken != NULL) { CloseHandle(userToken); userToken = NULL; }
|
||||||
#else
|
#else
|
||||||
int UID = (int)(uint64_t)(ILibPtrCAST)sid;
|
int UID = (int)(uint64_t)(ILibPtrCAST)sid;
|
||||||
#ifdef __APPLE__
|
|
||||||
if (spawnType == ILibProcessPipe_SpawnTypes_TERM) { spawnType = ILibProcessPipe_SpawnTypes_DEFAULT; }
|
|
||||||
#endif
|
|
||||||
if (spawnType == ILibProcessPipe_SpawnTypes_TERM)
|
if (spawnType == ILibProcessPipe_SpawnTypes_TERM)
|
||||||
{
|
{
|
||||||
#ifndef __APPLE__
|
|
||||||
int pipe;
|
int pipe;
|
||||||
struct winsize w;
|
struct winsize w;
|
||||||
struct termios tios;
|
struct termios tios;
|
||||||
@@ -958,9 +957,6 @@ ILibProcessPipe_Process ILibProcessPipe_Manager_SpawnProcessEx4(ILibProcessPipe_
|
|||||||
retVal->stdIn->mProcess = retVal;
|
retVal->stdIn->mProcess = retVal;
|
||||||
ILibProcessPipe_Pipe_SetBrokenPipeHandler(retVal->stdOut, ILibProcessPipe_Process_BrokenPipeSink);
|
ILibProcessPipe_Pipe_SetBrokenPipeHandler(retVal->stdOut, ILibProcessPipe_Process_BrokenPipeSink);
|
||||||
retVal->stdOut->mProcess = retVal;
|
retVal->stdOut->mProcess = retVal;
|
||||||
#else
|
|
||||||
pid = 0; // Apple LLVM is being dumb, and throws a warning if I don't do this, even tho it'll never run
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user