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

Bug#179659: NetBSD support in start-stop-daemon



Package: dpkg
Version: 1.10.9
Severity: wishlist
Tags: patch

Another NetBSD support patch.
-- 
Joel Baker <fenton@debian.org>
Package: dpkg
Version: 1.10.4
Patch: 002_start-stop-daemon_netbsd (NetBSD support in start-stop-daemon)
Author: Joel Baker <joel@lightbearer.com>
Submitted: No

This patch adds support for all NetBSD architectures to start-stop-daemon,
by applying the same general fixes that are required for FreeBSD and OpenBSD
(to wit, it recognizes the existance of NetBSD, and uses the replacement
pid_is_cmd function). It should be applied against an unpacked dpkg
directory, using -p1.

diff -urN dpkg-1.10.4.orig/utils/start-stop-daemon.c dpkg-1.10.4/utils/start-stop-daemon.c
--- dpkg-1.10.4.orig/utils/start-stop-daemon.c	Fri Jul 12 03:32:00 2002
+++ dpkg-1.10.4/utils/start-stop-daemon.c	Sun Sep  8 22:00:36 2002
@@ -34,6 +34,8 @@
 #  define OShpux
 #elif defined(__FreeBSD__)
 #  define OSFreeBSD
+#elif defined(__NetBSD__)
+#  define OSNetBSD
 #else
 #  error Unknown architecture - cannot build start-stop-daemon
 #endif
@@ -45,7 +47,7 @@
 #  include <ps.h>
 #endif
 
-#if defined(OSOpenBSD) || defined(OSFreeBSD)
+#if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD)
 #include <sys/param.h>
 #include <sys/user.h>
 #include <sys/proc.h>
@@ -677,7 +679,7 @@
 {
 #if defined(OSLinux) || defined(OShpux)
 	if (execname && !pid_is_exec(pid, &exec_stat))
-#elif defined(OSHURD) || defined(OSFreeBSD)
+#elif defined(OSHURD) || defined(OSFreeBSD) || defined(OSNetBSD)
     /* I will try this to see if it works */
 	if (execname && !pid_is_cmd(pid, execname))
 #endif
@@ -771,7 +773,7 @@
 #endif /* OSHURD */
 
 
-#if defined(OSOpenBSD) || defined(OSFreeBSD)
+#if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD)
 static int
 pid_is_cmd(pid_t pid, const char *name)
 {

Attachment: pgpx0kDM0Kk2r.pgp
Description: PGP signature


Reply to: