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

Bug#258051: FTBFS on kfreebsd-gnu



Ok, new patch.

The kfreebsd-gnu port is switching to Linux-style procfs, so we want to use
this on dpkg (which works better than our semi-broken libkvm implementation).

I'm keeping the autoconfiscation bits (HAVE_KVM_H) considering they're useful
for other situations, although libkvm is not enabled for kfreebsd-gnu now.

Re-diffed against the 1.13.0 version in experimental.

-- 
 .''`.   Proudly running Debian GNU/kFreeBSD unstable/unreleased (on UFS2+S)
: :' :
`. `'    http://www.debian.org/ports/kfreebsd-gnu
  `-
diff -Nur dpkg-1.13.0.old/configure.ac dpkg-1.13.0+kbsd/configure.ac
--- dpkg-1.13.0.old/configure.ac	2005-01-14 20:26:58.000000000 +0100
+++ dpkg-1.13.0+kbsd/configure.ac	2005-01-16 07:54:04.000000000 +0100
@@ -70,7 +70,7 @@
 
 # Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS([error.h sys/cdefs.h])
+AC_CHECK_HEADERS([error.h sys/cdefs.h kvm.h])
 DPKG_CHECK_DEFINE(TIOCNOTTY, [sys/ioctl.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
diff -Nur dpkg-1.13.0.old/utils/start-stop-daemon.c dpkg-1.13.0+kbsd/utils/start-stop-daemon.c
--- dpkg-1.13.0.old/utils/start-stop-daemon.c	2005-01-14 20:17:33.000000000 +0100
+++ dpkg-1.13.0+kbsd/utils/start-stop-daemon.c	2005-01-16 07:57:01.000000000 +0100
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#if defined(linux)
+#if defined(linux) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
 #  define OSLinux
 #elif defined(__GNU__)
 #  define OSHURD
@@ -47,18 +47,21 @@
 #  include <ps.h>
 #endif
 
-#if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD)
+#if  defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD)
 #include <sys/param.h>
-#include <sys/user.h>
 #include <sys/proc.h>
 #include <sys/stat.h>
-#include <sys/sysctl.h>
 #include <sys/types.h>
- 
+
 #include <err.h>
-#include <kvm.h>
 #include <limits.h>
 #endif
+ 
+#ifdef HAVE_KVM_H
+#include <kvm.h>
+#include <sys/sysctl.h>
+#include <sys/user.h>
+#endif
 
 #if defined(OShpux)
 #include <sys/param.h>
@@ -226,7 +229,7 @@
 	va_start(arglist, format);
 	vfprintf(stderr, format, arglist);
 	va_end(arglist);
-	putc('\n', stderr);
+	fprintf(stderr, " (%s)\n", strerror (errno));
 	exit(2);
 }
 
@@ -778,7 +781,7 @@
 /* WTA: this  needs to be an autoconf check for /proc/pid existance.
  */
 
-#if defined(OSLinux) || defined (OSsunos) || defined(OSfreebsd)
+#if defined(OSLinux) || defined (OSsunos)
 static void
 do_procinit(void)
 {
@@ -824,7 +827,7 @@
 #endif /* OSHURD */
 
 
-#if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD)
+#ifdef HAVE_KVM_H
 static int
 pid_is_cmd(pid_t pid, const char *name)
 {

Reply to: