2016-05-14 98 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