]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/alien/libraries/finder/linux/linux.factor
use reject instead of [ ... not ] filter.
[factor.git] / basis / alien / libraries / finder / linux / linux.factor
index 08cc69514674ea9eba6a14fda25cc92a40ef59fa..406cb9a41e582199006760829e8839099a5c6b4c 100644 (file)
@@ -17,7 +17,11 @@ CONSTANT: mach-map {
 : parse-ldconfig-lines ( string -- triple )
     [
         "=>" split1 [ [ blank? ] trim ] bi@
-        [ " " split1 [ "()" in? ] trim "," split ] dip 3array
+        [
+            " " split1 [ "()" in? ] trim "," split
+            [ [ blank? ] trim ] map
+            [ "OS ABI:" head? ] reject
+        ] dip 3array
     ] map ;
 
 : load-ldconfig-cache ( -- seq )
@@ -31,7 +35,7 @@ CONSTANT: mach-map {
     first swap ?head [ ?first CHAR: . = ] [ drop f ] if ;
 
 : arch-matches? ( lib triple -- ? )
-    [ drop ldconfig-arch ] [ second subset? ] bi* ;
+    [ drop ldconfig-arch ] [ second swap subset? ] bi* ;
 
 : ldconfig-matches? ( lib triple -- ? )
     { [ name-matches? ] [ arch-matches? ] } 2&& ;