[gcc r12-3081] libstdc++: Make permissions_are_testable function inline [PR90787]

Jonathan Wakely redi@gcc.gnu.org
Mon Aug 23 13:46:13 GMT 2021


https://gcc.gnu.org/g:bc97e736a5597ac1545b7f9069472117b6caa867

commit r12-3081-gbc97e736a5597ac1545b7f9069472117b6caa867
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Aug 23 13:05:25 2021 +0100

    libstdc++: Make permissions_are_testable function inline [PR90787]
    
    This function should be inline, so that's it's not emitted in tests that
    don't use it, to avoid undefined references to geteuid().
    
    libstdc++-v3/ChangeLog:
    
            PR libstdc++/90787
            * testsuite/util/testsuite_fs.h (permissions_are_testable):
            Define as inline.

Diff:
---
 libstdc++-v3/testsuite/util/testsuite_fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/testsuite/util/testsuite_fs.h b/libstdc++-v3/testsuite/util/testsuite_fs.h
index 674b60b83d2..0d32a616840 100644
--- a/libstdc++-v3/testsuite/util/testsuite_fs.h
+++ b/libstdc++-v3/testsuite/util/testsuite_fs.h
@@ -160,7 +160,7 @@ namespace __gnu_test
     path_type path;
   };
 
-  bool
+  inline bool
   permissions_are_testable(bool print_msg = true)
   {
     bool testable = false;


More information about the Libstdc++-cvs mailing list