[77890] trunk/dports/sysutils/dpkg

afb at macports.org afb at macports.org
Sat Apr 16 02:02:17 PDT 2011


Revision: 77890
          http://trac.macports.org/changeset/77890
Author:   afb at macports.org
Date:     2011-04-16 02:02:16 -0700 (Sat, 16 Apr 2011)
Log Message:
-----------
dpkg: fix build error on system with <kvm.h> (#29111)

Modified Paths:
--------------
    trunk/dports/sysutils/dpkg/Portfile
    trunk/dports/sysutils/dpkg/files/patch-utils_start-stop-daemon.c

Modified: trunk/dports/sysutils/dpkg/Portfile
===================================================================
--- trunk/dports/sysutils/dpkg/Portfile	2011-04-16 07:39:02 UTC (rev 77889)
+++ trunk/dports/sysutils/dpkg/Portfile	2011-04-16 09:02:16 UTC (rev 77890)
@@ -4,7 +4,7 @@
 
 name			dpkg
 version			1.14.29
-revision		3
+revision		4
 platforms		darwin freebsd
 categories		sysutils archivers
 maintainers		landonf openmaintainer

Modified: trunk/dports/sysutils/dpkg/files/patch-utils_start-stop-daemon.c
===================================================================
--- trunk/dports/sysutils/dpkg/files/patch-utils_start-stop-daemon.c	2011-04-16 07:39:02 UTC (rev 77889)
+++ trunk/dports/sysutils/dpkg/files/patch-utils_start-stop-daemon.c	2011-04-16 09:02:16 UTC (rev 77890)
@@ -28,48 +28,22 @@
  	/* Let's try this to see if it works */
  	if (execname && !pid_is_cmd(pid, execname))
  		return;
-@@ -931,7 +934,6 @@
- {
- 	kvm_t *kd;
- 	int nentries; /* Value not used */
--	uid_t proc_uid;
- 	struct kinfo_proc *kp;
- 	char errbuf[_POSIX2_LINE_MAX];
+@@ -882,6 +882,7 @@
+ }
+ #endif /* OSHURD */
  
-@@ -941,32 +944,8 @@
- 	kp = kvm_getprocs(kd, KERN_PROC_PID, pid, &nentries);
- 	if (kp == NULL)
- 		errx(1, "%s", kvm_geterr(kd));
--	if (kp->kp_proc.p_cred)
--		kvm_read(kd, (u_long)&(kp->kp_proc.p_cred->p_ruid),
--		         &proc_uid, sizeof(uid_t));
--	else
--		return 0;
--	return (proc_uid == (uid_t)uid);
--}
--
--static int
--pid_is_exec(pid_t pid, const char *name)
--{
--	kvm_t *kd;
--	int nentries;
--	struct kinfo_proc *kp;
--	char errbuf[_POSIX2_LINE_MAX], *pidexec;
- 
--	kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf);
--	if (kd == NULL)
--		errx(1, "%s", errbuf);
--	kp = kvm_getprocs(kd, KERN_PROC_PID, pid, &nentries);
--	if (kp == NULL)
--		errx(1, "%s", kvm_geterr(kd));
--	pidexec = (&kp->kp_proc)->p_comm;
--	if (strlen(name) != strlen(pidexec))
--		return 0;
--	return (strcmp(name, pidexec) == 0) ? 1 : 0;
-+	return (kp->ki_uid == (uid_t)uid);
++#if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD)
+ #ifdef HAVE_KVM_H
+ static int
+ pid_is_cmd(pid_t pid, const char *name)
+@@ -974,6 +975,7 @@
+ {
+ 	/* Nothing to do */
  }
++#endif
+ #endif /* OSOpenBSD */
  
- static void
+ #if defined(OShpux)
 @@ -975,6 +954,80 @@
  	/* Nothing to do */
  }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110416/9fc38ab1/attachment.html>


More information about the macports-changes mailing list