GNU bug report logs - #59586
Conflicting types for 'wait' in binutils test program

Previous Next

Package: dejagnu;

Reported by: John David Anglin <dave.anglin <at> bell.net>

Date: Fri, 25 Nov 2022 23:51:01 UTC

Owned by: jcb62281 <at> gmail.com

Severity: normal

Done: Jacob Bachmeyer <jcb62281 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: John David Anglin <dave.anglin <at> bell.net>
To: 59586 <at> debbugs.gnu.org
Subject: bug#59586: Conflicting types for 'wait' in binutils test program
Date: Fri, 25 Nov 2022 18:44:07 -0500
https://sourceware.org/bugzilla/show_bug.cgi?id=29828

            Bug ID: 29828
           Summary: error: conflicting types for 'wait'
           Product: binutils
           Version: 2.40 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
              Host: hppa2.0w-hp-hpux11.11
            Target: hppa2.0w-hp-hpux11.11
             Build: hppa2.0w-hp-hpux11.11

make[2]: Entering directory '/home/dave/gnu/binutils/objdir/libsframe'
make  testsuite/libsframe.decode/be-flipping
testsuite/libsframe.decode/frecnt-1
 testsuite/libsframe.decode/frecnt-2 testsuite/libsframe.encode/encode-1
make[3]: Entering directory '/home/dave/gnu/binutils/objdir/libsframe'
gcc -DHAVE_CONFIG_H -I. -I../../src/libsframe -I../../src/libsframe/../include
-Wall  -Wall -Wextra -Wwrite-strings -Wmissing-format-attribute
-Wstrict-prototy
pes -Wmissing-prototypes -O2 -g     -MT
testsuite/libsframe.decode/testsuite_lib
sframe_decode_be_flipping-be-flipping.o -MD -MP -MF
testsuite/libsframe.decode/.
deps/testsuite_libsframe_decode_be_flipping-be-flipping.Tpo -c -o
testsuite/libs
frame.decode/testsuite_libsframe_decode_be_flipping-be-flipping.o `test -f
'test
suite/libsframe.decode/be-flipping.c' || echo
'../../src/libsframe/'`testsuite/l
ibsframe.decode/be-flipping.c
In file included from
../../src/libsframe/testsuite/libsframe.decode/be-flipping
.c:28:
/opt/gnu/include/dejagnu.h:48:1: error: conflicting types for 'wait'
   48 | wait (void)
      | ^~~~
In file included from
/home/opt/gnu/gcc/gcc-10/lib/gcc/hppa2.0w-hp-hpux11.11/10.
3.1/include-fixed/stdlib.h:307,
                 from
../../src/libsframe/testsuite/libsframe.decode/be-flipping
.c:21:
/usr/include/sys/wait.h:74:21: note: previous declaration of 'wait' was here
   74 |        extern pid_t wait(int *);
      |                     ^~~~
make[3]: *** [Makefile:733:
testsuite/libsframe.decode/testsuite_libsframe_decod
e_be_flipping-be-flipping.o] Error 1
make[3]: Target 'testsuite/libsframe.decode/be-flipping' not remade because of
e
rrors.

In dejagnu.h, we have:

void
wait (void)
{
#ifdef_DEJAGNU_WAIT_
  fd_set rfds;
  struct timeval tv;

  FD_ZERO (&rfds);
  tv.tv_sec = 0;
  tv.tv_usec = 1;

  select (0, &rfds, NULL, NULL, &tv);
#endif
}

In fixed stdlib.h, we have:
#ifdef _INCLUDE_XOPEN_SOURCE_EXTENDED
# include <sys/wait.h>     /* For required W* macros */

Seems like a dejagnu bug. dejagnu-1.6.3 is installed.

Dave

-- 
John David Anglin  dave.anglin <at> bell.net





This bug report was last modified 2 years and 252 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.