# DP: Apply proposed patch for PR ada/49940. # This patch consists in copying the declaration (and import) of lwp_self from # s-osint-freebsd.ads to s-osint-kfreebsd-gnu.ads. Index: b/src/gcc/ada/s-osinte-kfreebsd-gnu.ads =================================================================== --- a/src/gcc/ada/s-osinte-kfreebsd-gnu.ads +++ b/src/gcc/ada/s-osinte-kfreebsd-gnu.ads @@ -236,6 +236,16 @@ function getpid return pid_t; pragma Import (C, getpid, "getpid"); + --------- + -- LWP -- + --------- + + function lwp_self return System.Address; + -- lwp_self does not exist on this thread library, revert to pthread_self + -- which is the closest approximation (with getpid). This function is + -- needed to share 7staprop.adb across POSIX-like targets. + pragma Import (C, lwp_self, "pthread_self"); + ------------- -- Threads -- -------------