C语言 linux/if_tun.h on Windows (mingw64)



如何在mingw64中修复此错误?

gcc -O2 -Wall -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -MMD -D_GNU_SOURCE -DCONFIG_VERSION= 2019-12-21"-DCONFIG_SLIRP -DCONFIG_FS_NET -DCONFIG_SDL -DCONFIG_RISCV_MAX_XLEN=128 -DCONFIG_X86EMU -c -o temu。o temu.ctemu.c:39:10:fatal error: linux/if_tun.h: No such file or directory39 | # include  & lt; linux/if_tun.h>  | ^~~~~~~~~~~~~~~~编译终止。make: *** [Makefile:129]0]错误1

我正在尝试编译timeemu .

我需要删除所有在"#ifndef"在Windows上不应该使用的区域

      的ifndef _WIN32 
       # include 
       & lt; termios.h> 
       # include 
       & lt; sys/ioctl.h> 
       # include 
       & lt; net/if.h> 
       # include 
       & lt; linux/if_tun.h> 
       # endif 
    

最新更新