https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=83af2fd6d1018bfe1c08c0028f65076f57684474

commit 83af2fd6d1018bfe1c08c0028f65076f57684474
Author:     Radek Bartoň <radek.bar...@microsoft.com>
AuthorDate: Thu Jun 5 12:42:05 2025 +0200
Commit:     Corinna Vinschen <cori...@vinschen.de>
CommitDate: Wed Jun 18 16:10:48 2025 +0200

    Cygwin: fix compatibility with GCC 15
    
    Signed-off-by: Radek Bartoň <radek.bar...@microsoft.com>

Diff:
---
 winsup/cygwin/create_posix_thread.cc    | 2 +-
 winsup/cygwin/local_includes/fhandler.h | 6 +++---
 winsup/cygwin/local_includes/thread.h   | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/winsup/cygwin/create_posix_thread.cc 
b/winsup/cygwin/create_posix_thread.cc
index 8e06099e4d2a..3fcd61707221 100644
--- a/winsup/cygwin/create_posix_thread.cc
+++ b/winsup/cygwin/create_posix_thread.cc
@@ -206,7 +206,7 @@ class thread_allocator
 public:
   thread_allocator () : current (THREAD_STORAGE_HIGH)
   {
-    alloc_func = wincap.has_extended_mem_api () ? &_alloc : &_alloc_old;
+    alloc_func = wincap.has_extended_mem_api () ? &thread_allocator::_alloc : 
&thread_allocator::_alloc_old;
   }
   PVOID alloc (SIZE_T size)
   {
diff --git a/winsup/cygwin/local_includes/fhandler.h 
b/winsup/cygwin/local_includes/fhandler.h
index 03f20c8fd554..3d9bc9fa58a8 100644
--- a/winsup/cygwin/local_includes/fhandler.h
+++ b/winsup/cygwin/local_includes/fhandler.h
@@ -1699,9 +1699,9 @@ class fhandler_disk_file: public fhandler_base
   uint64_t fs_ioc_getflags ();
   int fs_ioc_setflags (uint64_t);
 
-  falloc_allocate (int, off_t, off_t);
-  falloc_punch_hole (off_t, off_t);
-  falloc_zero_range (int, off_t, off_t);
+  int falloc_allocate (int, off_t, off_t);
+  int falloc_punch_hole (off_t, off_t);
+  int falloc_zero_range (int, off_t, off_t);
 
  public:
   fhandler_disk_file ();
diff --git a/winsup/cygwin/local_includes/thread.h 
b/winsup/cygwin/local_includes/thread.h
index 3955609e29f2..cbbbc3f1ea56 100644
--- a/winsup/cygwin/local_includes/thread.h
+++ b/winsup/cygwin/local_includes/thread.h
@@ -221,12 +221,12 @@ public:
   ~pthread_key ();
   static void fixup_before_fork ()
   {
-    for_each (_fixup_before_fork);
+    for_each (&pthread_key::_fixup_before_fork);
   }
 
   static void fixup_after_fork ()
   {
-    for_each (_fixup_after_fork);
+    for_each (&pthread_key::_fixup_after_fork);
   }
 
   static void run_all_destructors ()
@@ -245,7 +245,7 @@ public:
     for (int i = 0; i < PTHREAD_DESTRUCTOR_ITERATIONS; ++i)
       {
        iterate_dtors_once_more = false;
-       for_each (run_destructor);
+       for_each (&pthread_key::run_destructor);
        if (!iterate_dtors_once_more)
          break;
       }

Reply via email to