diff --git a/arch/lkl/include/asm/Kbuild b/arch/lkl/include/asm/Kbuild index 56d5d8f39a5d92..f6308985c61c9e 100644 --- a/arch/lkl/include/asm/Kbuild +++ b/arch/lkl/include/asm/Kbuild @@ -40,7 +40,6 @@ generic-y += mmu.h generic-y += mmu_context.h generic-y += module.h generic-y += msgbuf.h -generic-y += page.h generic-y += param.h generic-y += parport.h generic-y += pci.h diff --git a/arch/lkl/include/uapi/asm/unistd.h b/arch/lkl/include/uapi/asm/unistd.h index 206d8c5194a833..b30064b1e1857d 100644 --- a/arch/lkl/include/uapi/asm/unistd.h +++ b/arch/lkl/include/uapi/asm/unistd.h @@ -6,6 +6,8 @@ #define __ARCH_WANT_SET_GET_RLIMIT #define __ARCH_WANT_TIME32_SYSCALLS +#include + #if __BITS_PER_LONG == 64 #define __ARCH_WANT_SYS_NEWFSTATAT #endif diff --git a/arch/lkl/kernel/misc.c b/arch/lkl/kernel/misc.c index b9abc26879d576..a60076068748ba 100644 --- a/arch/lkl/kernel/misc.c +++ b/arch/lkl/kernel/misc.c @@ -5,6 +5,7 @@ #include #include +#ifdef CONFIG_PRINTK void dump_stack(void) { unsigned long dummy; @@ -15,13 +16,15 @@ void dump_stack(void) while (((long)stack & (THREAD_SIZE - 1)) != 0) { addr = *stack; if (__kernel_text_address(addr)) { - pr_info("%p: [<%08lx>] %pS", stack, addr, addr); + pr_info("%p: [<%08lx>] %pS", stack, addr, + (void *)addr); pr_cont("\n"); } stack++; } pr_info("\n"); } +#endif void show_regs(struct pt_regs *regs) { diff --git a/arch/lkl/kernel/setup.c b/arch/lkl/kernel/setup.c index 209d8df1c32d85..0d6482b5518d48 100644 --- a/arch/lkl/kernel/setup.c +++ b/arch/lkl/kernel/setup.c @@ -61,7 +61,7 @@ int __init lkl_start_kernel(struct lkl_host_operations *ops, va_end(ap); if (ops->virtio_devices) - strncpy(boot_command_line + ret, ops->virtio_devices, + strscpy(boot_command_line + ret, ops->virtio_devices, COMMAND_LINE_SIZE - ret); memcpy(cmd_line, boot_command_line, COMMAND_LINE_SIZE); diff --git a/tools/lkl/lib/config.c b/tools/lkl/lib/config.c index 8e2d8fda574b05..745d9959b7547f 100644 --- a/tools/lkl/lib/config.c +++ b/tools/lkl/lib/config.c @@ -1,6 +1,11 @@ #include #define _HAVE_STRING_ARCH_strtok_r #include +#ifndef __MINGW32__ +#include +#else +#define inet_pton lkl_inet_pton +#endif #include #include