2016-05-14 112 views
2

当我试图安装depencies一个Python脚本我得到这个错误:DIFF:选项不承认«--git»

build/temp.linux-x86_64-2.7/_openssl.c:697:6: error: conflicting types for ‘BIO_new_mem_buf’ 
BIO *BIO_new_mem_buf(void *, int); 
    ^
In file included from /usr/include/openssl/asn1.h:65:0, 
       from build/temp.linux-x86_64-2.7/_openssl.c:413: 
/usr/include/openssl/bio.h:692:6: note: previous declaration of ‘BIO_new_mem_buf’ was here 
BIO *BIO_new_mem_buf(const void *buf, int len); 
    ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 

我试试这个补丁发现here

diff --git a/dev-python/cryptography/cryptography-1.2.2.ebuild b/dev-python/cryptography/cryptography-1.2.2.ebuild 

但是然后我得到这个错误diff: option not recognize «--git»

我该如何解决这个错误?

回答

2

diff --git不是命令,而是header of a git diff -p(补丁):

What the -p option produces is slightly different from the traditional diff format:

It is preceded with a "git diff" header that looks like this:

diff --git a/file1 b/file2 

由于在Gentoo回购的diffstat在统一模式下,你可以在一个补丁文件复制它,apply it to your codebasepatch command
(见more examples here)。

patch foo.c < patch.diff 
+0

创建我为.diff文件并运行'补丁的foo.c