From 1df37c1ba3b3bad886b308a4f4515e79b558e27a Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 24 Aug 2017 09:47:57 -0400 Subject: [PATCH] fixed Linux build --- Makefile | 10 ++++++---- vanitygen.cpp | 9 +++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 8b01e84..099d46a 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,13 @@ LIBI2PD_CLIENT_PATH = $(I2PD_PATH)/libi2pd_client CXX = g++ FLAGS = -Wall -std=c++11 -Wno-misleading-indentation -ifneq ($(UNAME),Darwin && $(UNAME),Linux) +UNAME = $(shell uname -s) +ifeq ($(UNAME),Linux) + FLAGS += -g +else +# Win32 FLAGS += -Os -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN BOOST_SUFFIX = -mt -else - FLAGS += -g endif INCFLAGS = -I$(LIBI2PD_PATH) -I$(LIBI2PD_CLIENT_PATH) -I$(I2PD_PATH) @@ -16,7 +18,7 @@ CXXFLAGS = $(FLAGS) LDFLAGS = -Wl,-rpath,/usr/local/lib LIBS = $(I2PD_PATH)/libi2pd.a -lboost_system$(BOOST_SUFFIX) -lboost_date_time$(BOOST_SUFFIX) -lboost_filesystem$(BOOST_SUFFIX) -lboost_program_options$(BOOST_SUFFIX) -lssl -lcrypto -lpthread -lz -ifeq ($(UNAME),Darwin || $(UNAME),Linux) +ifeq ($(UNAME),Linux) LIBS += -lrt else LIBS += -lws2_32 -lwsock32 -lstdc++ -liphlpapi diff --git a/vanitygen.cpp b/vanitygen.cpp index d84153d..2fae07d 100644 --- a/vanitygen.cpp +++ b/vanitygen.cpp @@ -164,8 +164,8 @@ Orignal is sensei of crypto ;) std::cout << "Address found " << addr << " in " << id_thread << std::endl; found=true; FoundNonce=*nonce; - free(hash); - free(b); + // free(hash); + // free(b); return true; } @@ -173,11 +173,12 @@ Orignal is sensei of crypto ;) hashescounter++; if (found) { - free(hash); - free(b); + // free(hash); + // free(b); break; } }//while + return true; } int main (int argc, char * argv[])