@@ -49,7 +49,7 @@ fn user_sig_test_multiprocsignals() {
4949 if pid == 0 {
5050 let mut new = SignalAction :: default ( ) ;
5151 let old = SignalAction :: default ( ) ;
52- new. handler = func as usize ;
52+ new. handler = func as * const ( ) as usize ;
5353 if sigaction ( SignalNo :: SIGUSR1 , & new, & old) < 0 {
5454 panic ! ( "Sigaction failed!" ) ;
5555 }
@@ -67,7 +67,7 @@ fn user_sig_test_restore() {
6767 let mut new = SignalAction :: default ( ) ;
6868 let old = SignalAction :: default ( ) ;
6969 let old2 = SignalAction :: default ( ) ;
70- new. handler = func as usize ;
70+ new. handler = func as * const ( ) as usize ;
7171
7272 if sigaction ( SignalNo :: SIGUSR1 , & new, & old) < 0 {
7373 panic ! ( "Sigaction failed!" ) ;
@@ -108,7 +108,7 @@ fn kernel_sig_test_stop_cont() {
108108fn kernel_sig_test_failignorekill ( ) {
109109 let mut new = SignalAction :: default ( ) ;
110110 let old = SignalAction :: default ( ) ;
111- new. handler = func as usize ;
111+ new. handler = func as * const ( ) as usize ;
112112
113113 if sigaction ( SignalNo :: SIGKILL , & new, & old) >= 0 {
114114 panic ! ( "Should not set sigaction to kill!" ) ;
@@ -126,11 +126,11 @@ fn kernel_sig_test_failignorekill() {
126126fn final_sig_test ( ) {
127127 let mut new = SignalAction :: default ( ) ;
128128 let old = SignalAction :: default ( ) ;
129- new. handler = func2 as usize ;
129+ new. handler = func2 as * const ( ) as usize ;
130130
131131 let mut new2 = SignalAction :: default ( ) ;
132132 let old2 = SignalAction :: default ( ) ;
133- new2. handler = func3 as usize ;
133+ new2. handler = func3 as * const ( ) as usize ;
134134
135135 let pid = fork ( ) ;
136136 if pid == 0 {
0 commit comments