Ticket #3971 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Tests: error: unknown type name 'sighandler_t' on illumos

Reported by: mnowak Owned by: andrew_b
Priority: major Milestone: 4.8.23
Component: tests Version: 4.8.22
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

I build Midnight Commander 4.8.22 test suite on OpenIndiana? 2018.10 (illumos kernel) and the it fails with:

  CC       utilunix__my_system-fork_fail.o
In file included from /export/home/newman/ws/oi-userland/components/sysutils/mc/mc-4.8.22/tests/lib/utilunix__my_system-fork_fail.c:36:0:
/export/home/newman/ws/oi-userland/components/sysutils/mc/mc-4.8.22/tests/lib/utilunix__my_system-common.c:126:8: error: unknown type name 'sighandler_t'
 static sighandler_t signal__return_value = NULL;
        ^~~~~~~~~~~~
/export/home/newman/ws/oi-userland/components/sysutils/mc/mc-4.8.22/tests/lib/utilunix__my_system-common.c:126:44: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
 static sighandler_t signal__return_value = NULL;
                                            ^~~~
/export/home/newman/ws/oi-userland/components/sysutils/mc/mc-4.8.22/tests/lib/utilunix__my_system-common.c:129:1: error: unknown type name 'sighandler_t'
 sighandler_t
 ^~~~~~~~~~~~
/export/home/newman/ws/oi-userland/components/sysutils/mc/mc-4.8.22/tests/lib/utilunix__my_system-common.c:130:21: error: unknown type name 'sighandler_t'
 signal (int signum, sighandler_t handler)
                     ^~~~~~~~~~~~
/export/home/newman/ws/oi-userland/components/sysutils/mc/mc-4.8.22/tests/lib/utilunix__my_system-common.c: In function 'setup':
/export/home/newman/ws/oi-userland/components/sysutils/mc/mc-4.8.22/tests/lib/utilunix__my_system-common.c:305:26: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     signal__return_value = NULL;
                          ^
make[5]: *** [Makefile:897: utilunix__my_system-fork_fail.o] Error 1

The problem seems to be that on illumos we don't have the sighandler_t GNU extension in our signal.h.

Can it be implemented differently? Can it be removed from compilation on platforms not supporting this GNU extension so test can be run?

Change History

comment:1 Changed 5 years ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.23

Branch: 3971_sighandler_t
changeset:75d9891216de86c75df883df5547e21aebeb7ebc

Please test.

comment:2 Changed 5 years ago by mnowak

Thank you, Andrew for the changeset, with it I was able to compile the test suite. However, there are some failures, hence I filed http://midnight-commander.org/ticket/3972.

comment:3 Changed 5 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:4 Changed 5 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:5 Changed 5 years ago by andrew_b

  • Status changed from testing to closed

comment:6 Changed 5 years ago by mnowak

Works for me, thanks for fixing it and sorry for not reaching out.

Note: See TracTickets for help on using tickets.