From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
Johannes Berg <johannes@sipsolutions.net>
Subject: [PATCH v2] um: include sys/types.h for size_t
Date: Sun, 17 Jul 2022 10:53:46 +0200 [thread overview]
Message-ID: <20220717085346.1525754-1-Jason@zx2c4.com> (raw)
In-Reply-To: <20220713100029.163083-1-Jason@zx2c4.com>
Usually size_t comes from sys/types.h, not stddef.h. This code likely
worked only because something else in its usage chain was pulling in
sys/types.h. stddef.h is still required for NULL, however, so note this.
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
arch/um/include/shared/user.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/um/include/shared/user.h b/arch/um/include/shared/user.h
index dd4badffdeb3..bda66e5a9d4e 100644
--- a/arch/um/include/shared/user.h
+++ b/arch/um/include/shared/user.h
@@ -16,11 +16,12 @@
*/
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-/* This is to get size_t */
+/* This is to get size_t and NULL */
#ifndef __UM_HOST__
#include <linux/types.h>
#else
#include <stddef.h>
+#include <sys/types.h>
#endif
extern void panic(const char *fmt, ...)
--
2.35.1
prev parent reply other threads:[~2022-07-17 9:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 10:00 [PATCH] um: include sys/types.h instead of stddef.h " Jason A. Donenfeld
2022-07-17 8:53 ` Jason A. Donenfeld [this message]
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=20220717085346.1525754-1-Jason@zx2c4.com \
--to=jason@zx2c4.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.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
all inboxes | Powered by JetHome®