public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: David Wei <dw@davidwei.uk>
To: io-uring@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>,
	Pavel Begunkov <asml.silence@gmail.com>,
	David Wei <dw@davidwei.uk>
Subject: [PATCH liburing] sanitize: add ifdef guard around sanitizer functions
Date: Wed,  2 Oct 2024 17:02:09 -0700	[thread overview]
Message-ID: <20241003000209.1159551-1-dw@davidwei.uk> (raw)

Otherwise there are redefinition errors during compilation if
CONFIG_USE_SANITIZER isn't set.

Signed-off-by: David Wei <dw@davidwei.uk>
---
 src/sanitize.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/sanitize.c b/src/sanitize.c
index 46391a6..db5930d 100644
--- a/src/sanitize.c
+++ b/src/sanitize.c
@@ -118,6 +118,7 @@ static inline void initialize_sanitize_handlers()
 	sanitize_handlers_initialized = true;
 }
 
+#if defined(CONFIG_USE_SANITIZER)
 void liburing_sanitize_ring(struct io_uring *ring)
 {
 	struct io_uring_sq *sq = &ring->sq;
@@ -174,3 +175,4 @@ void liburing_sanitize_iovecs(const struct iovec *iovecs, unsigned nr)
 		}
 	}
 }
+#endif
-- 
2.43.5


             reply	other threads:[~2024-10-03  0:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-03  0:02 David Wei [this message]
2024-10-03  0:45 ` [PATCH liburing] sanitize: add ifdef guard around sanitizer functions Jens Axboe

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=20241003000209.1159551-1-dw@davidwei.uk \
    --to=dw@davidwei.uk \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox