Skip to content

Commit

Permalink
Fix compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DCrow committed Nov 10, 2020
1 parent 263889e commit b57a401
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ext/sqlanywhere2/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static VALUE rb_sqlanywhere_rollback_bang(VALUE self) {
return Qtrue;
}

void init_sqlanywhere2_connection() {
void init_sqlanywhere_connection() {
cSQLAnywhere2Connection = rb_define_class_under(mSQLAnywhere2, "Connection", rb_cObject);

rb_define_alloc_func(cSQLAnywhere2Connection, allocate);
Expand Down
4 changes: 4 additions & 0 deletions ext/sqlanywhere2/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
$LOCAL_LIBS << '-ldbcapi_r'
end

if RUBY_PLATFORM =~ /darwin/
$LDFLAGS += " -Wl,-rpath,#{lib_path}"
end

dir_config(extension_name, sdk_path, lib_path)

create_makefile("#{extension_name}/#{extension_name}")
4 changes: 2 additions & 2 deletions ext/sqlanywhere2/sqlanywhere2.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ void Init_sqlanywhere2() {
mSQLAnywhere2 = rb_define_module("SQLAnywhere2");
cSQLAnywhere2Error = rb_const_get(mSQLAnywhere2, rb_intern("Error"));

init_sqlanywhere2_connection();
init_sqlanywhere2_statement();
init_sqlanywhere_connection();
init_sqlanywhere_statement();
}
2 changes: 1 addition & 1 deletion ext/sqlanywhere2/statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ static VALUE rb_sqlanywhere_stmt_execute(int argc, VALUE *argv, VALUE self) {
return result;
}

void init_sqlanywhere2_statement() {
void init_sqlanywhere_statement() {
cDate = rb_const_get(rb_cObject, rb_intern("Date"));
cTime = rb_const_get(rb_cObject, rb_intern("Time"));
cBigDecimal = rb_const_get(rb_cObject, rb_intern("BigDecimal"));
Expand Down

0 comments on commit b57a401

Please sign in to comment.