Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Linux build problems #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
all: openssl heartleech

openssl:
if [ ! -d openssl ] ; then git clone git://git.openssl.org/openssl.git && cd openssl && git checkout bb3e20cf8c5e733c16fe68ce41f67eea5a2a520e && ./config && make && make depend ; fi

heartleech: heartleech.c
gcc -I../openssl/include -L../openssl -lcrypto -lssl -lcrypto -ldl -lpthread -o heartleech heartleech.c

gcc heartleech.c -Iopenssl -Iopenssl/include -Iopenssl/crypto/include -Iopenssl/ssl openssl/libssl.a openssl/libcrypto.a -ldl -lpthread -o heartleech

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
gcc heartleech.c -I openssl -I openssl/include -I openssl/crypto/include -I openssl/ssl -I openssl/libssl.a -I openssl/libcrypto.a -ldl -lpthread -o heartleech

clean:
-rm -r heartleech openssl
3 changes: 2 additions & 1 deletion heartleech.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ typedef uintptr_t pthread_t;
#include <errno.h>
#include <dlfcn.h>
#include <pthread.h>
#include "./openssl/crypto/bn/bn_lcl.h"
#include "./openssl/ssl/ssl_locl.h"
#define WSAGetLastError() (errno)
#define closesocket(fd) close(fd)
#define WSA(err) (err)
#endif
#if defined(_MSC_VER)
Expand Down