"#include <asm/io.h>"导致"错误:asm/io.h:没有这样的文件或目录"

mar*_*usw 7 c gentoo hardware-interface parallel-port

我正在使用gentoo并尝试编译程序来控制并行端口上的位.这条线靠近它的顶部:

#include <asm/io.h>
Run Code Online (Sandbox Code Playgroud)

当我尝试在其上使用gcc时,它会产生以下输出:

port.c:4:20:错误:asm/io.h:没有这样的文件或目录

"找到asm/io.h"yeilds(除其他外):

/usr/src/linux-2.6.32-gentoo/arch/x86/include/asm/io.h

所以我有头文件,但它找不到它?为什么这不起作用?

Alo*_*hal 10

我不确定你是不是该程序的作者,或者你只是想编译一个你从某人那里得到的程序,但看起来 #include <asm/io.h>应该被替换为#include <sys/io.h>.有关详细信息,请参阅此Google搜索的结果.