https://gcc.gnu.org/g:30196a6bb90f9f7e043554b85c75e7071582ab8b

commit r17-6518-g30196a6bb90f9f7e043554b85c75e7071582ab8b
Author: Thomas Schwinge <[email protected]>
Date:   Tue Nov 10 09:27:04 2026 +0100

    (Partial) OpenMP 5.0 support for GCC 9 (runtime library changes): Fix 
'uname' check
    
    In Subversion r265930 (Git commit 28567c40e2c7c88e424283e8a1a6ff8cb7ba440c)
    "(Partial) OpenMP 5.0 support for GCC 9 (runtime library changes)" part, a
    "Check for uname" was added.  However, currently all the 'HAVE_UNAME' code 
is
    dead, given that the 'configure' check always fails to compile:
    
        conftest.c: In function 'main':
        conftest.c:55:16: error: incompatible type for argument 1 of 'uname'
           55 |    if (!uname (buf))
              |                ^~~
              |                |
              |                struct utsname
        In file included from conftest.c:49:
        /usr/include/x86_64-linux-gnu/sys/utsname.h:81:35: note: expected 
'struct utsname *' but argument is of type 'struct utsname'
           81 | extern int uname (struct utsname *__name) __THROW;
              |                   ~~~~~~~~~~~~~~~~^~~~~~
    
            libgomp/
            * configure.ac: Fix 'uname' check.
            * configure: Regenerate.

Diff:
---
 libgomp/configure    | 2 +-
 libgomp/configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgomp/configure b/libgomp/configure
index 2feff7199b28..5d6b282ad522 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -16011,7 +16011,7 @@ main ()
 {
 struct utsname buf;
    volatile size_t len = 0;
-   if (!uname (buf))
+   if (!uname (&buf))
      len = strlen (buf.nodename);
   ;
   return 0;
diff --git a/libgomp/configure.ac b/libgomp/configure.ac
index 61e49ec077ed..5e949ce57587 100644
--- a/libgomp/configure.ac
+++ b/libgomp/configure.ac
@@ -333,7 +333,7 @@ AC_COMPILE_IFELSE(
    #include <sys/utsname.h>],
   [struct utsname buf;
    volatile size_t len = 0;
-   if (!uname (buf))
+   if (!uname (&buf))
      len = strlen (buf.nodename);])],
   AC_DEFINE(HAVE_UNAME, 1,
 [      Define if uname is supported and struct utsname has nodename field.]))

Reply via email to