2016-05-14 3 views
2

Quand je suis en train d'installer depencies pour un script python je reçois cette erreur:diff: possibilité de ne pas reconnaître «--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 

J'essaie ce patch trouvé here:

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

Mais alors j'obtiens cette erreur diff: option not recognize «--git»

Comment réparer cette erreur?

Répondre

2

diff --git n'est pas une commande, mais le header of a git diff -p (patch):

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 

Depuis le diffstat dans le repo papou est en mode unifié, vous pouvez le copier dans un fichier de patch, et apply it to your codebase avec un patch command.
(Voir more examples here).

patch foo.c < patch.diff 
+0

J'ai créé mon fichier .diff et exécutez 'Patch foo.c