diff mbox series

[2/2] RISC-V: Fix the undeclared ‘EM_RISCV’ build failure

Message ID 20230811104117.91406-2-songshuaishuai@tinylab.org (mailing list archive)
State Changes Requested
Headers show
Series [1/2] RISC-V: Use linux,usable-memory-range for crash kernel | expand

Checks

Context Check Description
conchuod/tree_selection fail Failed to apply to next/pending-fixes, riscv/for-next or riscv/master

Commit Message

Song Shuai Aug. 11, 2023, 10:41 a.m. UTC
Use local `elf.h` instead of `linux/elf.h` to fix this build error:

```
kexec/arch/riscv/crashdump-riscv.c:17:13: error: ‘EM_RISCV’ undeclared here (not in a function); did you mean ‘EM_CRIS’?
  .machine = EM_RISCV,
             ^~~~~~~~
             EM_CRIS
```

Signed-off-by: Song Shuai <songshuaishuai@tinylab.org>
---
 kexec/arch/riscv/crashdump-riscv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kexec/arch/riscv/crashdump-riscv.c b/kexec/arch/riscv/crashdump-riscv.c
index 3ed4fe3..336d7a7 100644
--- a/kexec/arch/riscv/crashdump-riscv.c
+++ b/kexec/arch/riscv/crashdump-riscv.c
@@ -1,5 +1,5 @@ 
 #include <errno.h>
-#include <linux/elf.h>
+#include <elf.h>
 #include <unistd.h>
 
 #include "kexec.h"