pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/50565: lang/go14 does not build on SunOS



Hauke, does the following patch fix things for you:

(also as https://gist.github.com/bsiegert/5a6de6c85e81802e0a21 for
easier pasting.)

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/go14/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile 27 Sep 2015 00:36:02 -0000 1.5
+++ Makefile 21 Dec 2015 09:47:13 -0000
@@ -4,6 +4,7 @@

 DISTNAME= go${GO14_VERSION}.src
 PKGNAME= go14-${GO14_VERSION}
+PKGREVISION= 1
 CATEGORIES= lang
 MASTER_SITES= https://storage.googleapis.com/golang/
 PATCH_SITES= https://codereview.appspot.com/download/
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/go14/distinfo,v
retrieving revision 1.4
diff -u -r1.4 distinfo
--- distinfo 3 Nov 2015 22:50:36 -0000 1.4
+++ distinfo 21 Dec 2015 09:47:13 -0000
@@ -23,7 +23,7 @@
 SHA1 (patch-src_net_cgo__bsd.go) = 4678fccd6956300ce55343965334fc3881383bbc
 SHA1 (patch-src_net_cgo__stub.go) = cf373587745d68e556dadf3a61956b489b4f420a
 SHA1 (patch-src_net_cgo__unix.go) = cebe897ab624aaf52bebc50d12a045d6b4ea2bc6
-SHA1 (patch-src_os_user_lookup__unix.go) =
861cf9b2b64bc314b6ee8e11411245e214717515
+SHA1 (patch-src_os_user_lookup__unix.go) =
2cb66fb1af534f45c14bded4994a00584a7cc19d
 SHA1 (patch-src_runtime_cgo_cgo.go) = 9cc88b35d12e0d52e76495e04f7fce2b78af08d5
 SHA1 (patch-src_runtime_cgo_gcc__setenv.c) =
c9614b76d71e84ad46b2ce785580fdc54b261455
 SHA1 (patch-src_runtime_cgo_gcc__solaris__amd64.c) =
633d8dcc8a843e343ee2ab9edb7cfaf6f6c3865b
Index: patches/patch-src_os_user_lookup__unix.go
===================================================================
RCS file: /cvsroot/pkgsrc/lang/go14/patches/patch-src_os_user_lookup__unix.go,v
retrieving revision 1.1
diff -u -r1.1 patch-src_os_user_lookup__unix.go
--- patches/patch-src_os_user_lookup__unix.go 31 Jul 2015 14:46:25 -0000 1.1
+++ patches/patch-src_os_user_lookup__unix.go 21 Dec 2015 09:47:13 -0000
@@ -1,10 +1,10 @@
 $NetBSD: patch-src_os_user_lookup__unix.go,v 1.1 2015/07/31 14:46:25
bsiegert Exp $

-Support cgo on illumos.
+http://golang.org/cl/8261

 --- src/os/user/lookup_unix.go.orig 2014-12-11 01:18:10.000000000 +0000
 +++ src/os/user/lookup_unix.go
-@@ -17,6 +17,7 @@ import (
+@@ -17,6 +17,7 @@
  )

  /*
@@ -12,3 +12,30 @@
  #include <unistd.h>
  #include <sys/types.h>
  #include <pwd.h>
+@@ -24,7 +25,12 @@
+
+ static int mygetpwuid_r(int uid, struct passwd *pwd,
+ char *buf, size_t buflen, struct passwd **result) {
+- return getpwuid_r(uid, pwd, buf, buflen, result);
++ return getpwuid_r(uid, pwd, buf, buflen, result);
++}
++
++static int mygetpwnam_r(const char *name, struct passwd *pwd,
++ char *buf, size_t buflen, struct passwd **result) {
++ return getpwnam_r(name, pwd, buf, buflen, result);
+ }
+ */
+ import "C"
+@@ -67,7 +73,11 @@
+ if lookupByName {
+ nameC := C.CString(username)
+ defer C.free(unsafe.Pointer(nameC))
+- rv = C.getpwnam_r(nameC,
++ // mygetpwnam_r is a wrapper around getpwnam_r to avoid
++ // passing a size_t to getpwnam_r, because for unknown
++ // reasons passing a size_t to getpwnam_r doesn't work on
++ // Solaris.
++ rv = C.mygetpwnam_r(nameC,
+ &pwd,
+ (*C.char)(buf),
+ C.size_t(bufSize),


Home | Main Index | Thread Index | Old Index