Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/java-interop/java-interop-gc-bridge-mono.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "java-interop-mono.h"

#ifdef __linux__
#include <sys/syscall.h>
#include <unistd.h>
#endif /* !defined (__linux__) */

Expand Down Expand Up @@ -1178,7 +1179,7 @@ get_thread_id (void)
return _mono_thread_get_managed_id (thread);
}
#if __linux__
int64_t tid = gettid ();
int64_t tid = (int64_t)((pid_t)syscall(SYS_gettid));
#else
int64_t tid = (int64_t) pthread_self ();
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/java-interop/java-interop.mdproj
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<_Files>@(Compile -&gt; '%(Identity)', ' ')</_Files>
</PropertyGroup>
<MakeDir Directories="obj" />
<Exec Command="gcc -g -shared -std=c99 -o $(OutputPath)\lib$(OutputName).so $(_CppFlags) $(_LinkFlags) $(_Libs) $(_Includes) $(_Files)" />
<Exec Command="gcc -g -shared -std=c99 -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L -o $(OutputPath)\lib$(OutputName).so $(_CppFlags) $(_LinkFlags) $(_Libs) $(_Includes) $(_Files)" />
</Target>
<Target Name="Clean">
<RemoveDir Directories="obj" />
Expand Down