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.
---
 libgomp/configure    | 2 +-
 libgomp/configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgomp/configure b/libgomp/configure
index 9af9b5783cad..5edd76fd186b 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -16018,7 +16018,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 e03ceb51bcd1..8c88f33651b3 100644
--- a/libgomp/configure.ac
+++ b/libgomp/configure.ac
@@ -336,7 +336,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.]))
-- 
2.53.0

Reply via email to