um: include sys/types.h for size_t
authorJason A. Donenfeld <Jason@zx2c4.com>
Sun, 17 Jul 2022 08:53:46 +0000 (10:53 +0200)
committerRichard Weinberger <richard@nod.at>
Sun, 17 Jul 2022 21:47:18 +0000 (23:47 +0200)
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>
arch/um/include/shared/user.h

index dd4badffdeb3d76a35551387108a3ccf0288b8e2..bda66e5a9d4e3fc8187cb5b3356475a5bec0c556 100644 (file)
  */
 #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, ...)