summaryrefslogtreecommitdiff
path: root/audio/musicpd
diff options
context:
space:
mode:
authordmcmahill <dmcmahill@pkgsrc.org>2006-10-25 23:17:29 +0000
committerdmcmahill <dmcmahill@pkgsrc.org>2006-10-25 23:17:29 +0000
commit39e138b78a85d6eade86607814f7e3961db289b5 (patch)
tree6accf1ae5f3b3e5fd9d4a8c56cc323b0e900f2ab /audio/musicpd
parent5639a44c954ad26aacc4fb1647796ec019968415 (diff)
downloadpkgsrc-39e138b78a85d6eade86607814f7e3961db289b5.tar.gz
setenv() doesn't exist on solaris so use putenv() instead.
Diffstat (limited to 'audio/musicpd')
-rw-r--r--audio/musicpd/distinfo3
-rw-r--r--audio/musicpd/patches/patch-aa24
2 files changed, 26 insertions, 1 deletions
diff --git a/audio/musicpd/distinfo b/audio/musicpd/distinfo
index 65e090fd5b3..276a6c929d7 100644
--- a/audio/musicpd/distinfo
+++ b/audio/musicpd/distinfo
@@ -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 --git a/audio/musicpd/patches/patch-aa b/audio/musicpd/patches/patch-aa
new file mode 100644
index 00000000000..015995e990d
--- /dev/null
+++ b/audio/musicpd/patches/patch-aa
@@ -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);
++ }
+ }
+ }
+ }