This is an automated email from Gerrit.

"Sevan Janiyan <ventur...@geeklan.co.uk>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/8130

-- gerrit

commit 542254c575b3d20c72274a631f4bead48b07cb08
Author: Sevan Janiyan <ventur...@geeklan.co.uk>
Date:   Sun Feb 4 01:06:35 2024 +0000

    src/helper/options.c: Extend IS_DARWIN guard
    
    libproc showed up in OS X 10.5, use AvailabilityMacros.h to control
    when libproc support is enabled. Allows OpenOCD to build on OS X 10.4
    which lacks libproc.
    
    Change-Id: I8ea59674f1172a170d6f2adbde5baa67a48aad9c
    Signed-off-by: Sevan Janiyan <ventur...@geeklan.co.uk>

diff --git a/src/helper/options.c b/src/helper/options.c
index 05cde6709f..2554e5b027 100644
--- a/src/helper/options.c
+++ b/src/helper/options.c
@@ -22,8 +22,11 @@
 #include <stdlib.h>
 #include <string.h>
 #if IS_DARWIN
+#include <AvailabilityMacros.h>
+#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED >= 
1050
 #include <libproc.h>
 #endif
+#endif
 /* sys/sysctl.h is deprecated on Linux from glibc 2.30 */
 #ifndef __linux__
 #ifdef HAVE_SYS_SYSCTL_H
@@ -74,7 +77,7 @@ static char *find_exe_path(void)
                                *p = '/';
                }
 
-#elif IS_DARWIN
+#elif IS_DARWIN && defined(MAC_OS_X_VERSION_MIN_REQUIRED) && 
MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
                exepath = malloc(PROC_PIDPATHINFO_MAXSIZE);
                if (!exepath)
                        break;
@@ -190,7 +193,7 @@ static void add_user_dirs(void)
 #endif
 
        const char *home = getenv("HOME");
-#if IS_DARWIN
+#if IS_DARWIN && defined(MAC_OS_X_VERSION_MIN_REQUIRED) && 
MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
        if (home) {
                path = alloc_printf("%s/Library/Preferences/org.openocd", home);
                if (path) {

-- 

Reply via email to