编译内核错误:stdio.h:没有这样的文件或目录 [英] Compiling kernel error: stdio.h: No such file or directory

查看:405
本文介绍了编译内核错误:stdio.h:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在针对Linux 2.6.39内核进行SYSTEM CALL.

I am making SYSTEM CALL for linux 2.6.39 kernel.

我已经完成了文件中的所有编辑.现在,当我尝试编译内核时,它显示此错误:

I have completed all the edits in the files. Now When i am trying to compile the kernel it is showing this error :

错误:stdio.h:没有这样的文件或目录

error: stdio.h: No such file or directory

如果我删除了stdio.h,系统调用会正常工作吗?

If i remove stdio.h, Will the system call work ???

我的代码是

#include<stdio.h>
#include <linux/linkage.h>

asmlinkage long sys_atvfcfs(int at[], int bt[], int n)
{

int i=0;
int j,t,wt[n],sum,q;

float avgwt;


 for(j=i+1;j<n;j++)
  {
   if(at[i]>at[j])

    {
t=at[i];
at[i]=at[j];
at[j]=t;
q=bt[i];
bt[i]=bt[j];
bt[j]=q;
    }
   }


wt[0]=0;
sum=0;


for(i=0;i<n-1;i++)
{

wt[i+1]=wt[i]+bt[i];
sum=sum+(wt[i+1]-at[i]);

}

avgwt=sum/n;

return avgwt;


}

推荐答案

我在您的代码中看不到任何io函数,因此您无需包含stdio.h

I do'nt see any io functions used in your code, so you don't need to include stdio.h

这篇关于编译内核错误:stdio.h:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆