]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: silence darwin/386 build warnings
authorRuss Cox <rsc@golang.org>
Wed, 21 Dec 2011 12:23:03 +0000 (07:23 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 21 Dec 2011 12:23:03 +0000 (07:23 -0500)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5502056

src/pkg/runtime/cgo/gcc_darwin_386.c
src/pkg/runtime/signal_darwin_386.c

index dbc3d31f9cb2f4be3fa93d80da19cfe361187a4c..dfeb9e11f6743c340be4afd9a6ce805e8f30b39b 100644 (file)
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+#include <string.h> /* for strerror */
 #include <pthread.h>
 #include "libcgo.h"
 
index c1cab2ccaa54a1227ef20b5baac4aa15e750826e..14f99115b4ccc0903af7042145eeb1e161b4c679 100644 (file)
@@ -142,7 +142,7 @@ sigaction(int32 i, void (*fn)(int32, Siginfo*, void*, G*), bool restart)
                sa.sa_flags |= SA_RESTART;
        sa.sa_mask = ~0U;
        sa.sa_tramp = (void*)runtime·sigtramp; // runtime·sigtramp's job is to call into real handler
-       *(uintptr*)&sa.__sigaction_u = (uintptr)fn;
+       *(uintptr*)sa.__sigaction_u = (uintptr)fn;
        runtime·sigaction(i, &sa, nil);
 }