2016-06-29 17 views
0

私はstruct credの内部にあるuid、guid、...を書き換えたいので、現在cred.hヘッダファイルをインクルードしようとしています。しかし、インクルードは "致命的なエラー:linux/cred.h:そのようなファイルやディレクトリはありません"というエラーメッセージで失敗します。カーネルヘッダファイルをユーザ空間プログラムにインクルードすることができないので、これが起こると思います。この問題を解決する方法はありますか?cantはlinux/cred.hヘッダファイルを含んでいます: "そのようなファイルやディレクトリはありません"


更新:

sudo find/-name cred.h 
/tmp/mozilla_alex0/cred.h 
/home/alex/Android/Sdk/goldfish/include/linux/cred.h 
/usr/src/linux-headers-4.4.0-24/include/linux/cred.h 
/usr/src/linux-headers-4.4.0-21/include/linux/cred.h 
:私はアンドロイドのNDK-buildコマンドを使用して、それをコンパイルしたいのですが、似は optionnあり、findコマンドはこの出力を与えることを言及するのを忘れてしまった

ああ

は、今私は次のことを試してみました:

$ ndk-build -I /usr/src/linux-headers-4.4.0-21/include/linux/ 
[armeabi] Compile thumb : futex_exploit <= exploit.c 
/home/alex/Android/libfutex_exploit-master/libfutex_exploit-master/jni/exploit.c:34:18: fatal error: cred.h: No such file or directory 
#include <cred.h> 
       ^
compilation terminated. 

しようとすると、

$ gcc -I/usr/src/linux-headers-4.4.0-21/include/linux/ exploit.c -o exploit 
In file included from /usr/include/stdio.h:33:0, 
       from exploit.c:21: 
/usr/src/linux-headers-4.4.0-21/include/linux/stddef.h:4:31: fatal error: uapi/linux/stddef.h: No such file or directory 
compilation terminated. 

答えて

2

がファイルcred.hを必要とし、コンパイラがそれを検索するフォルダに入れて検索:GCCを使用してファイルをコンパイルするために、私は同じエラーを取得します。

gcc ..... -I<include folder> ..... 
関連する問題