From f18bdb7b56d5e248f968fde99c2dee371dc09546 Mon Sep 17 00:00:00 2001 From: Sebastian Marsching Date: Sun, 24 Feb 2019 11:27:40 +0100 Subject: [PATCH] Fix build on macOS. This changeset consists of two changes: The declaration of the pyInitLastState global variable is moved from pydevsup.h to setup.c. This is needed to avoid an "duplicate symbols" error when linking. As this variable is only used in setup.c anyway, there is no downside in moving its declaration there. The log example application is now only built on Linux. As it depends on the inotify API, which is Linux-specific, it cannot be reasonably built on other platforms. As it is not needed for the pyDevSup to work, it is OK to built it without this application. --- devsupApp/src/pydevsup.h | 2 -- devsupApp/src/setup.c | 2 ++ logApp/src/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/devsupApp/src/pydevsup.h b/devsupApp/src/pydevsup.h index 9b7cbf8..d4071bd 100644 --- a/devsupApp/src/pydevsup.h +++ b/devsupApp/src/pydevsup.h @@ -15,8 +15,6 @@ #endif -initHookState pyInitLastState; - PyMODINIT_FUNC init_dbbase(void); void pyDBD_cleanup(void); diff --git a/devsupApp/src/setup.c b/devsupApp/src/setup.c index 9b4ad51..fa93c50 100644 --- a/devsupApp/src/setup.c +++ b/devsupApp/src/setup.c @@ -24,6 +24,8 @@ #include "pydevsup.h" +initHookState pyInitLastState; + typedef struct { const initHookState state; const char * const name; diff --git a/logApp/src/Makefile b/logApp/src/Makefile index 98ba1ce..cec0b1e 100644 --- a/logApp/src/Makefile +++ b/logApp/src/Makefile @@ -9,7 +9,7 @@ include $(TOP)/configure/CONFIG_PY #============================= # Build the IOC application -LOADABLE_LIBRARY_HOST = _inotifyy +LOADABLE_LIBRARY_HOST_Linux = _inotifyy _inotifyy_SRCS += inotify_wrap.c