Skip to content

Commit e4875ee

Browse files
committed
Fix build with r2 from git
1 parent 888251a commit e4875ee

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,11 @@ int main(int argc, const char **argv) {
211211
case 'E':
212212
{
213213
char *rc_path = r_file_home (".config/r2ai/rc");
214+
#if R2_ABIVERSION >= 120
215+
r_cons_editor (core->cons, rc_path, NULL, NULL);
216+
#else
214217
r_cons_editor (core->cons, rc_path, NULL);
218+
#endif
215219
free (rc_path);
216220
goto beach;
217221
}

src/r2ai.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,11 @@ R_API void cmd_r2ai(RCorePluginSession *cps, const char *input) {
533533
r2ai_apikeys_edit (cps);
534534
} else if (r_str_startswith (input, "-E")) {
535535
char *rc_path = r_file_home (".config/r2ai/rc");
536+
#if R2_ABIVERSION >= 120
537+
r_cons_editor (core->cons, rc_path, NULL, NULL);
538+
#else
536539
r_cons_editor (core->cons, rc_path, NULL);
540+
#endif
537541
free (rc_path);
538542
load_r2airc (cps);
539543
} else if (r_str_startswith (input, "-e")) {

0 commit comments

Comments
 (0)