Commit 0845a75c authored by Paul Eggert's avatar Paul Eggert
Browse files

Fix a build failure on OpenBSD 4.x and MirBSD.

* sysdep.c (list_system_processes): Make it a stub on all BSD_SYSTEM
hosts, except for DARWIN_OS and FreeBSD where it's been tested.

Fixes: debbugs:13881
parent 9b1c3271
2013-03-05 Paul Eggert <eggert@cs.ucla.edu>
Fix a build failure on OpenBSD 4.x and MirBSD (Bug#13881).
* sysdep.c (list_system_processes) [__OpenBSD__ || __MirBSD__]:
* sysdep.c (list_system_processes)
[BSD_SYSTEM && !DARWIN_OS && !__FreeBSD__]:
Make it a stub in this case; otherwise the build might fail,
and even if the build worked the function would just return nil anyway.
and this code hasn't been tested on such hosts anyway.
Problem reported by Nelson H. F. Beebe in
<http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00021.html>
and analyzed by Jérémie Courrèges-Anglas in
......
......@@ -2647,12 +2647,12 @@ list_system_processes (void)
return proclist;
}
#elif defined BSD_SYSTEM && !defined __OpenBSD__ && !defined __MirBSD__
#elif defined DARWIN_OS || defined __FreeBSD__
Lisp_Object
list_system_processes (void)
{
#if defined DARWIN_OS || defined __NetBSD__
#ifdef DARWIN_OS
int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL};
#else
int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC};
......@@ -2678,7 +2678,7 @@ list_system_processes (void)
len /= sizeof (struct kinfo_proc);
for (i = 0; i < len; i++)
{
#if defined DARWIN_OS || defined __NetBSD__
#ifdef DARWIN_OS
proclist = Fcons (make_fixnum_or_float (procs[i].kp_proc.p_pid), proclist);
#else
proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment