[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11797: trunk does not build on NetBSD
From: |
Han Boetes |
Subject: |
bug#11797: trunk does not build on NetBSD |
Date: |
Sat, 07 Jul 2012 11:14:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 |
I noticed a similar problem on OpenBSD not building and offered Paul
Eggert an account on my machine so he could fix the issue. This is what
he changed. Since he used __OpenBSD__ I don't think it will work on
NetBSD but it's a sure step in the right direction.
Please consider reading:
http://www.openbsd.org/faq/ports/guide.html#PortsGeneric
~/nfs/Emacs/emacs% bzr diff -r-40.. src/sysdep.c
=== modified file 'src/sysdep.c'
--- src/sysdep.c 2012-07-05 18:35:48 +0000
+++ src/sysdep.c 2012-07-06 08:28:29 +0000
@@ -38,17 +38,17 @@
#include "sysselect.h"
#include "blockinput.h"
+#ifdef BSD_SYSTEM
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#endif
+
#ifdef __FreeBSD__
-#include <sys/sysctl.h>
#include <sys/user.h>
#include <sys/resource.h>
#include <math.h>
#endif
-#ifdef DARWIN_OS
-#include <sys/sysctl.h>
-#endif
-
#ifdef WINDOWSNT
#define read sys_read
#define write sys_write
@@ -2520,7 +2520,7 @@
Lisp_Object
list_system_processes (void)
{
-#ifdef DARWIN_OS
+#if defined DARWIN_OS || defined __OpenBSD__
int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL};
#else
int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC};
@@ -2548,6 +2548,8 @@
{
#ifdef DARWIN_OS
proclist = Fcons (make_fixnum_or_float (procs[i].kp_proc.p_pid),
proclist);
+#elif defined __OpenBSD__
+ proclist = Fcons (make_fixnum_or_float (procs[i].p_pid), proclist);
#else
proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist);
#endif