code review 7857044: net: fix build with CGO_ENABLED=0 (issue 7857044)

67 views
Skip to first unread message

dvy...@google.com

unread,
Mar 15, 2013, 1:30:36 PM3/15/13
to golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
Reviewers: golang-dev1,

Message:
Hello golan...@googlegroups.com,

I'd like you to review this change to
https://dvyukov%40goog...@code.google.com/p/go/


Description:
net: fix build with CGO_ENABLED=0

Please review this at https://codereview.appspot.com/7857044/

Affected files:
A src/pkg/net/empty.c


Index: src/pkg/net/empty.c
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/pkg/net/empty.c
@@ -0,0 +1,8 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file is required to prevent compiler errors
+// when the package built with CGO_ENABLED=0.
+// Otherwise the compiler says:
+// pkg/net/fd_poll_runtime.go:15: missing function body


Russ Cox

unread,
Mar 15, 2013, 1:51:28 PM3/15/13
to Dmitry Vyukov, golang-dev, re...@codereview-hr.appspotmail.com
LGTM

mikioh...@gmail.com

unread,
Mar 15, 2013, 1:55:10 PM3/15/13
to dvy...@google.com, golan...@googlegroups.com, r...@golang.org, re...@codereview-hr.appspotmail.com

Russ Cox

unread,
Mar 15, 2013, 1:59:06 PM3/15/13
to Dmitry Vyukov, golang-dev, Russ Cox, Mikio Hara, re...@codereview-hr.appspotmail.com
it's not really fundamental to cgo. cgo is just masking the problem

dvy...@google.com

unread,
Mar 15, 2013, 2:23:43 PM3/15/13
to dvy...@google.com, golan...@googlegroups.com, r...@golang.org, mikioh...@gmail.com, re...@codereview-hr.appspotmail.com
*** Submitted as
https://code.google.com/p/go/source/detail?r=4f4a78297e7a ***

net: fix build with CGO_ENABLED=0

R=golang-dev, rsc, mikioh.mikioh
CC=golang-dev
https://codereview.appspot.com/7857044


https://codereview.appspot.com/7857044/
Reply all
Reply to author
Forward
0 new messages