I think the following fixes this PR; it consists only in duplicating a
few lines from s-osinte-freebsd.ads to s-osinte-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
@@ -238,6 +238,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 --
    -------------
Index: b/src/gcc/ada/ChangeLog
===================================================================
--- a/src/gcc/ada/ChangeLog
+++ b/src/gcc/ada/ChangeLog
@@ -0,0 +1,6 @@
+2011-08-02  Ludovic Brenta  <ludo...@ludovic-brenta.org>
+
+       PR ada/49940
+       * s-osinte-kfreebsd-gnu.ads (lwp_self): import pthread_self, as on
+       FreeBSD.
+




-- 
Ludovic Brenta.

Reply via email to