From 0845a75c6a624f88e232499a4c1dd7ff3c6eef5a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 5 Mar 2013 23:46:09 -0800 Subject: [PATCH] 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 --- src/ChangeLog | 5 +++-- src/sysdep.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 18b22b5da46..f67046ebd43 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,9 +1,10 @@ 2013-03-05 Paul Eggert 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 and analyzed by Jérémie Courrèges-Anglas in diff --git a/src/sysdep.c b/src/sysdep.c index 80c7e0bc51e..19c56869ea0 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -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); -- 2.39.2