From 4d41dd140fdf890f0ef851066a4afb54018c32c7 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Fri, 15 Jul 2022 17:43:23 -0500 Subject: [PATCH] Add some #ifdefs for future Apple support if needed https://github.com/Hamlib/Hamlib/issues/985 --- src/settings.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/settings.c b/src/settings.c index bc5c4f707..521bc4a40 100644 --- a/src/settings.c +++ b/src/settings.c @@ -986,6 +986,19 @@ HAMLIB_EXPORT(int) rig_settings_get_path(char *path, int pathlen) return -RIG_EINTERNAL; } +#ifdef APPLE +//#include "TargetConditionals.h" +#ifdef TARGET_OS_IPHONE +// iOS +#elif TARGET_IPHONE_SIMULATOR +// iOS Simulator +#elif TARGET_OS_MAC +// Other kinds of Mac OS +#else +// Unsupported platform +#endif +#endif + char *xdgpath = getenv("XDG_CONFIG_HOME"); char *home = getenv("HOME"); snprintf(path, pathlen, "%s/.config", home);