{"thread":{"id":"56306","subject":"[RFC PATCH] fsmonitor: fix building with NO_PTHREADS","startedAt":"2021-08-17T08:23:25Z","lastAt":"2021-08-18T09:44:24Z","messageCount":3,"participants":["Carlo Marcelo Arenas Belón","Jeff Hostetler","Carlo Arenas"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"432917","messageId":"20210817082310.2157-1-carenas@gmail.com","threadId":"56306","inReplyTo":null,"subject":"[RFC PATCH] fsmonitor: fix building with NO_PTHREADS","fromName":"Carlo Marcelo Arenas Belón","fromEmail":"carenas@gmail.com","sentAt":"2021-08-17T08:23:10Z","receivedAt":"2021-08-17T08:23:25Z","isPatch":true,"sender":{"key":"carenas@gmail.com","avatar":"https://avatars.githubusercontent.com/u/76036?v=4"},"body":"something similar will be needed for the NO_UNIX_SOCKETS, since the\nsystem setting for support of FSMONITOR_DAEMON_BACKEND is not enough\nto cover for the code dependencies.\n\nalternatively FSMONITOR_DAEMON_BACKEND could be used to imply support\nwas requested AND code dependencies are covered, but this setup at\nleast allows for building and uses the \"mock\" implementation.\n\nsince the enum is needed for the fallback code, had to be moved outside\nof the #ifdef\n\nSigned-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>\n---\n Makefile     |  2 ++\n simple-ipc.h | 14 +++++++-------\n 2 files changed, 9 insertions(+), 7 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 987677e882..752ec7ccd9 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1969,10 +1969,12 @@ ifdef NEED_ACCESS_ROOT_HANDLER\n \tCOMPAT_OBJS += compat/access.o\n endif\n \n+ifndef NO_PTHREADS\n ifdef FSMONITOR_DAEMON_BACKEND\n \tCOMPAT_CFLAGS += -DHAVE_FSMONITOR_DAEMON_BACKEND\n \tCOMPAT_OBJS += compat/fsmonitor/fsmonitor-fs-listen-$(FSMONITOR_DAEMON_BACKEND).o\n endif\n+endif\n \n ifeq ($(TCLTK_PATH),)\n NO_TCLTK = NoThanks\ndiff --git a/simple-ipc.h b/simple-ipc.h\nindex 9c7330fcda..b396293bdf 100644\n--- a/simple-ipc.h\n+++ b/simple-ipc.h\n@@ -5,13 +5,6 @@\n  * See Documentation/technical/api-simple-ipc.txt\n  */\n \n-#ifdef SUPPORTS_SIMPLE_IPC\n-#include \"pkt-line.h\"\n-\n-/*\n- * Simple IPC Client Side API.\n- */\n-\n enum ipc_active_state {\n \t/*\n \t * The pipe/socket exists and the daemon is waiting for connections.\n@@ -43,6 +36,13 @@ enum ipc_active_state {\n \tIPC_STATE__OTHER_ERROR,\n };\n \n+#ifdef SUPPORTS_SIMPLE_IPC\n+#include \"pkt-line.h\"\n+\n+/*\n+ * Simple IPC Client Side API.\n+ */\n+\n struct ipc_client_connect_options {\n \t/*\n \t * Spin under timeout if the server is running but can't\n-- \n2.33.0.476.gf000ecbed9\n\n"},{"id":"433012","messageId":"a5468146-aa26-62a1-2c7e-e35fa73ff041@jeffhostetler.com","threadId":"56306","inReplyTo":"20210817082310.2157-1-carenas@gmail.com","subject":"Re: [RFC PATCH] fsmonitor: fix building with NO_PTHREADS","fromName":"Jeff Hostetler","fromEmail":"git@jeffhostetler.com","sentAt":"2021-08-17T17:56:10Z","receivedAt":"2021-08-17T17:56:13Z","isPatch":true,"sender":{"key":"git@jeffhostetler.com","avatar":null},"body":"\n\nOn 8/17/21 4:23 AM, Carlo Marcelo Arenas Belón wrote:\n> something similar will be needed for the NO_UNIX_SOCKETS, since the\n> system setting for support of FSMONITOR_DAEMON_BACKEND is not enough\n> to cover for the code dependencies.\n> \n> alternatively FSMONITOR_DAEMON_BACKEND could be used to imply support\n> was requested AND code dependencies are covered, but this setup at\n> least allows for building and uses the \"mock\" implementation.\n> \n> since the enum is needed for the fallback code, had to be moved outside\n> of the #ifdef\n> \n> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>\n > ...\n\n\nThanks, I'll incorporate this into my next version.\nBTW, what platform did you detect this on?\n\nJeff\n\n"},{"id":"433054","messageId":"CAPUEspgreQEs+N2J=pWXm83Tv=D2xKbujFs5OQZJkmMoP9GENA@mail.gmail.com","threadId":"56306","inReplyTo":"a5468146-aa26-62a1-2c7e-e35fa73ff041@jeffhostetler.com","subject":"Re: [RFC PATCH] fsmonitor: fix building with NO_PTHREADS","fromName":"Carlo Arenas","fromEmail":"carenas@gmail.com","sentAt":"2021-08-18T09:44:10Z","receivedAt":"2021-08-18T09:44:24Z","isPatch":true,"sender":{"key":"carenas@gmail.com","avatar":"https://avatars.githubusercontent.com/u/76036?v=4"},"body":"On Tue, Aug 17, 2021 at 10:56 AM Jeff Hostetler <git@jeffhostetler.com> wrote:\n>\n> BTW, what platform did you detect this on?\n\nmacOS, when building with:\n\n  $ make NO_PTHREADS=1\n\nobviously not using the defaults.\n\nCarlo\n"}]}