All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: git@vger.kernel.org
Cc: jeffhost@microsoft.com, "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Subject: [RFC PATCH] fsmonitor: fix building with NO_PTHREADS
Date: Tue, 17 Aug 2021 01:23:10 -0700	[thread overview]
Message-ID: <20210817082310.2157-1-carenas@gmail.com> (raw)

something similar will be needed for the NO_UNIX_SOCKETS, since the
system setting for support of FSMONITOR_DAEMON_BACKEND is not enough
to cover for the code dependencies.

alternatively FSMONITOR_DAEMON_BACKEND could be used to imply support
was requested AND code dependencies are covered, but this setup at
least allows for building and uses the "mock" implementation.

since the enum is needed for the fallback code, had to be moved outside
of the #ifdef

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 Makefile     |  2 ++
 simple-ipc.h | 14 +++++++-------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 987677e882..752ec7ccd9 100644
--- a/Makefile
+++ b/Makefile
@@ -1969,10 +1969,12 @@ ifdef NEED_ACCESS_ROOT_HANDLER
 	COMPAT_OBJS += compat/access.o
 endif
 
+ifndef NO_PTHREADS
 ifdef FSMONITOR_DAEMON_BACKEND
 	COMPAT_CFLAGS += -DHAVE_FSMONITOR_DAEMON_BACKEND
 	COMPAT_OBJS += compat/fsmonitor/fsmonitor-fs-listen-$(FSMONITOR_DAEMON_BACKEND).o
 endif
+endif
 
 ifeq ($(TCLTK_PATH),)
 NO_TCLTK = NoThanks
diff --git a/simple-ipc.h b/simple-ipc.h
index 9c7330fcda..b396293bdf 100644
--- a/simple-ipc.h
+++ b/simple-ipc.h
@@ -5,13 +5,6 @@
  * See Documentation/technical/api-simple-ipc.txt
  */
 
-#ifdef SUPPORTS_SIMPLE_IPC
-#include "pkt-line.h"
-
-/*
- * Simple IPC Client Side API.
- */
-
 enum ipc_active_state {
 	/*
 	 * The pipe/socket exists and the daemon is waiting for connections.
@@ -43,6 +36,13 @@ enum ipc_active_state {
 	IPC_STATE__OTHER_ERROR,
 };
 
+#ifdef SUPPORTS_SIMPLE_IPC
+#include "pkt-line.h"
+
+/*
+ * Simple IPC Client Side API.
+ */
+
 struct ipc_client_connect_options {
 	/*
 	 * Spin under timeout if the server is running but can't
-- 
2.33.0.476.gf000ecbed9


             reply	other threads:[~2021-08-17  8:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17  8:23 Carlo Marcelo Arenas Belón [this message]
2021-08-17 17:56 ` [RFC PATCH] fsmonitor: fix building with NO_PTHREADS Jeff Hostetler
2021-08-18  9:44   ` Carlo Arenas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210817082310.2157-1-carenas@gmail.com \
    --to=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jeffhost@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.