summaryrefslogtreecommitdiff
path: root/arch/um/include
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-07-17 10:53:46 +0200
committerRichard Weinberger <richard@nod.at>2022-07-17 23:47:18 +0200
commitaf3e16101cee95efaa72095fe06c15ec0b8eb195 (patch)
tree61de3317bcd97a851603a2fa3f23e267c9464184 /arch/um/include
parent8970d5c9f4a95db6efa9158814b953bfa0bf1f5b (diff)
um: include sys/types.h for size_t
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> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/include')
-rw-r--r--arch/um/include/shared/user.h3
1 files changed, 2 insertions, 1 deletions
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, ...)