2016-05-14 4 views
2

Когда я пытаюсь установить depencies для питона сценария я получаю эту ошибку:дифф: опция не признают «--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 

Поскольку статистику различий в папуасских репо в едином режиме, вы можете скопировать его в файл заплатки, и apply it to your codebase с patch command.
(См. more examples here).

patch foo.c < patch.diff 
+0

Я создал файл .diff и запустить 'патч foo.c

Смежные вопросы