gcla/termshark

Does not build on riscv64

Closed this issue · 4 comments

nmeum commented

Hi, I just wanted to let you know that termshark does not build on riscv64 by default. This is due to following issues:

  1. github.com/kr/pty does not support riscv64. However, the repository is a fork and archived. The original version github.com/creack/pty does support riscv64. Maybe switch to that?
  2. Similar to arm64, the dup2 syscall is not available on riscv64. You can just use dup3 as set the last argument (the flags argument) to zero. This is equivalent to dup2. There should be no need for a custom DumpcapExt implementation for arm64/riscv64 IMHO.
gcla commented

Thanks for the report @nmeum , I'll look into this.

qbit commented

fwiw, the creack/pty also will allow termshark to build on OpenBSD/armv7,arm64 (and mips64 once creack/pty#123 lands).

gcla commented

Thanks @nmeum and @qbit - please let me know if the master branch needs more work for your needs.

gcla commented

I'll close this for now because I think it's resolved on master - but please re-open if it's not resolved.