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

Support OpenSSL 1.1.0 #2415

Merged
merged 8 commits into from
Jan 18, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Changes from Dipin's code review.
Improve the error reporting in the Makefile for default_openssl and
OPENSSL.

Fix a memory leak when removing a build flag.
  • Loading branch information
winksaville committed Jan 15, 2018
commit 506765dce1583c67a1c3e4284eb1700f24dfbaac
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -308,7 +308,11 @@ ifneq (,$(OPENSSL))
ifeq (ok,$(OPENSSL_VALID))
$(warning targeting openssl $(OPENSSL))
else
$(error OPENSSL=$(OPENSSL) is invalid, expecting one of -Dopenssl_0.9.0 or -Dopenssl_1.1.0)
ifdef default_openssl
$(error default_openssl=$(default_openssl) is invalid, expecting one of openssl_0.9.0 or openssl_1.1.0)
else
$(error OPENSSL=$(OPENSSL) is invalid, expecting one of -Dopenssl_0.9.0 or -Dopenssl_1.1.0)
endif
endif
endif

6 changes: 5 additions & 1 deletion src/libponyc/pkg/buildflagset.c
Original file line number Diff line number Diff line change
@@ -549,8 +549,12 @@ bool remove_build_flags(const char* flags[])
for(const char** next = flags; *next != NULL; next += 1)
{
flag_t f1 = {stringtab(*next), false};
if(flagtab_remove(_user_flags, &f1) != NULL)
flag_t* found = flagtab_remove(_user_flags, &f1);
if(found != NULL)
{
flag_free(found);
removed += 1;
}
}

return removed > 0;