diff --git a/libr/core/file.c b/libr/core/file.c index f7d14fdcc1..14d9139bd2 100644 --- a/libr/core/file.c +++ b/libr/core/file.c @@ -306,7 +306,11 @@ static int r_core_file_do_load_for_debug (RCore *r, ut64 loadaddr, const char *f } #endif // HACK if its a relative path, load from disk instead of memory +#if __APPLE__ int fd = (filenameuri[0] == '.')? -1: desc->fd; +#else + int fd = desc->fd; +#endif if (!r_bin_load (r->bin, filenameuri, baseaddr, loadaddr, xtr_idx, fd, treat_as_rawstr)) { eprintf ("Cannot open %s\n", filenameuri); if (r_config_get_i (r->config, "bin.rawstr")) { diff --git a/shlr/java/dsojson.c b/shlr/java/dsojson.c index aee234f3a8..de135fc114 100644 --- a/shlr/java/dsojson.c +++ b/shlr/java/dsojson.c @@ -12,7 +12,6 @@ R_API char * dso_json_dict_to_str (DsoJsonDict *list); R_API char * dso_json_num_to_str (DsoJsonNum * num); R_API char * dso_json_str_to_str (DsoJsonStr *str); -static int cmpDsoStr (DsoJsonStr *dsoStr1, DsoJsonStr *dsoStr2); static int cmpDsoStr_to_str (DsoJsonStr *dsoStr1, char *dsoStr2); static const DsoJsonInfo* get_type_info (unsigned int type); static char * dso_json_get_str_data (DsoJsonObj *dso_obj); @@ -165,11 +164,6 @@ static const DsoJsonInfo* get_type_info (unsigned int type) { return NULL; } -static int cmpDsoStr (DsoJsonStr *dsoStr1, DsoJsonStr *dsoStr2) { - if (dsoStr1 && dsoStr2) return cmpDsoStr_to_str (dsoStr1, dsoStr2->data); - return -1; -} - static int cmpDsoStr_to_str (DsoJsonStr *dsoStr1, char *dsoStr2) { if (dsoStr1 && dsoStr1->data && dsoStr2) return strcmp (dsoStr1->data, dsoStr2);