Skip to content

Commit af3e161

Browse files
zx2c4richardweinberger
authored andcommitted
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>
1 parent 8970d5c commit af3e161

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/um/include/shared/user.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
*/
1717
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
1818

19-
/* This is to get size_t */
19+
/* This is to get size_t and NULL */
2020
#ifndef __UM_HOST__
2121
#include <linux/types.h>
2222
#else
2323
#include <stddef.h>
24+
#include <sys/types.h>
2425
#endif
2526

2627
extern void panic(const char *fmt, ...)

0 commit comments

Comments
 (0)