Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Nov 27, 2023
2 parents 1116ca7 + 1e2e78c commit 677da86
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/bif_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
#include "prolog.h"
#include "query.h"

#ifndef _WIN32
#include <signal.h>
#include <unistd.h>
#endif

#ifdef _WIN32
#define ctime_r(p1,p2) ctime(p1)
#define gmtime_r(p1,p2) gmtime(p1)
Expand Down Expand Up @@ -217,7 +222,7 @@ static bool bif_posix_gettid_1(query *q)
{
GET_FIRST_ARG(p1,var);
cell tmp;
#if !defined(_WIN32) && !defined(__wasi__)
#if defined(linux) && !defined(__wasi__)
make_int(&tmp, gettid());
#else
make_int(&tmp, 42);
Expand All @@ -241,7 +246,7 @@ static bool bif_posix_getppid_1(query *q)
{
GET_FIRST_ARG(p1,var);
cell tmp;
#if !defined(_WIN32) && !defined(__wasi__)
#if defined(linux) && !defined(__wasi__)
make_int(&tmp, getppid());
#else
make_int(&tmp, -1);
Expand Down

0 comments on commit 677da86

Please sign in to comment.