From db2cdd3e3d1d0474903b84085c314998a20935fc Mon Sep 17 00:00:00 2001 From: Brian Boru Date: Sun, 12 Sep 2021 01:41:49 +0300 Subject: [PATCH] fix, building --- Jamfile | 7 +------ Jamrules.configure | 6 ++++++ src/ether.c | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Jamfile b/Jamfile index 1d97e83..0ad4486 100644 --- a/Jamfile +++ b/Jamfile @@ -4,14 +4,9 @@ if $(windoze) { use-mingw32 ; } -if $(debug) { - CFLAGS.all += -O0 -g3 ; -} else { - set-profile ; -} set-default-locations ; -CFLAGS.all += -fPIC -D_GNU_SOURCE -Wall -Iinclude/libcoin -fsplit-stack ; +CFLAGS.all += -fPIC -D_GNU_SOURCE -Wall -Iinclude/libcoin ; SubDir TOP ; SubInclude TOP src ; diff --git a/Jamrules.configure b/Jamrules.configure index 0b62234..83763f1 100644 --- a/Jamrules.configure +++ b/Jamrules.configure @@ -26,6 +26,12 @@ rule -configure- { } else { Exit "libgmp not found" ; } + if $(debug) { + -configure-add-line- "CFLAGS.all += -O0 -g3 ;" ; + -configure-add-line- "SubInclude TOP test ;" ; + } else { + -configure-add-line- "set-profile ;" ; + } } configure ; diff --git a/src/ether.c b/src/ether.c index 8eeb9ee..b542730 100644 --- a/src/ether.c +++ b/src/ether.c @@ -362,7 +362,8 @@ void eth_ctx_clear (eth_ctx_t *ctx) { int eth_prepare_exec (eth_contract_t *contract, const char *from, const char *proto, eth_ctx_t *ctx) { eth_method_list_t *methods = contract->methods; eth_method_t t = { .proto = (char*)proto }; - SORTED_ARRAY_FIND(methods, t); + size_t idx; + SORTED_ARRAY_FIND(methods, t, idx); if (0 == errno) { coin_errcode = COIN_NOMETHOD; snprintf(coin_errmsg, sizeof coin_errmsg, "unknown contract method %s", proto); -- 2.11.4.GIT