Logging: edits to build on macOS

This commit is contained in:
Campbell Barton 2018-04-16 07:38:11 +02:00
parent 80f7249d09
commit b4e8d33f11
1 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@
#include <assert.h>
/* For 'isatty' to check for color. */
#if defined(__unix__)
#if defined(__unix__) || defined(__APPLE__)
# include <unistd.h>
#endif
@ -454,7 +454,7 @@ static void CLG_ctx_output_set(CLogContext *ctx, void *file_handle)
{
ctx->output_file = file_handle;
ctx->output = fileno(file_handle);
#if defined(__unix__)
#if defined(__unix__) || defined(__APPLE__)
ctx->use_color = isatty(ctx->output);
#endif
}