pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio/musicpd setenv() doesn't exist on solaris so use...
details: https://anonhg.NetBSD.org/pkgsrc/rev/7ccea5e4a6dd
branches: trunk
changeset: 520695:7ccea5e4a6dd
user: dmcmahill <dmcmahill%pkgsrc.org@localhost>
date: Wed Oct 25 23:17:29 2006 +0000
description:
setenv() doesn't exist on solaris so use putenv() instead.
diffstat:
audio/musicpd/distinfo | 3 ++-
audio/musicpd/patches/patch-aa | 24 ++++++++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletions(-)
diffs (39 lines):
diff -r 5b041bdba813 -r 7ccea5e4a6dd audio/musicpd/distinfo
--- a/audio/musicpd/distinfo Wed Oct 25 21:37:51 2006 +0000
+++ b/audio/musicpd/distinfo Wed Oct 25 23:17:29 2006 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.9 2005/02/23 20:39:50 agc Exp $
+$NetBSD: distinfo,v 1.10 2006/10/25 23:17:29 dmcmahill Exp $
SHA1 (mpd-0.11.5.tar.gz) = 5661008b3eb799f8d76949a37bc439917dbbb68a
RMD160 (mpd-0.11.5.tar.gz) = 4a7dd3473110aa1f860fbd7a760da7fdfe2a9ebf
Size (mpd-0.11.5.tar.gz) = 1127523 bytes
+SHA1 (patch-aa) = 67e28d15948f19a5472782b7b18af10a754db6f5
diff -r 5b041bdba813 -r 7ccea5e4a6dd audio/musicpd/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/musicpd/patches/patch-aa Wed Oct 25 23:17:29 2006 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-aa,v 1.3 2006/10/25 23:17:30 dmcmahill Exp $
+
+http://www.musicpd.org/mantis/view.php?id=1379
+
+setenv() doesn't exist on all systems (e.g. solaris 9)
+
+--- src/main.c.orig 2006-10-25 15:26:10.800946000 -0400
++++ src/main.c
+@@ -262,7 +262,14 @@ void changeToUser(Options * options) {
+ }
+
+ if(userpwd->pw_dir) {
+- setenv("HOME", userpwd->pw_dir, 1);
++ char *tmps;
++ /* HOME=%s so we need 5 for HOME= and 1 for the terminating \0 */
++ tmps = (char *) malloc (strlen(userpwd->pw_dir) + 6);
++ if (tmps != NULL) {
++ sprintf (tmps, "HOME=%s", userpwd->pw_dir);
++ putenv (tmps);
++ free (tmps);
++ }
+ }
+ }
+ }
Home |
Main Index |
Thread Index |
Old Index