From 687dfb57c61ef9a777f706b73b14da93aa3ea448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 15 Nov 2011 15:59:44 +0100 Subject: Fix clang linking problem Inlining was not done in a portable way. clang follows the C99 semantics for inlining ('inline' essentially implies 'static' in C99, but not in GCC), so bp_sched2ix() was not visible outside beam_bp.c. Since the function need to be used from more than one source file, put the function definition in the beam_bp.h header file. Also, give it an 'erts_' prefix since it is globally visible. --- erts/emulator/beam/erl_nif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/emulator/beam/erl_nif.c') diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index 62798bb2c1..740a1b853e 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -1669,7 +1669,7 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2) } else { /* Function traced, patch the original instruction word */ BpData** bps = (BpData**) code_ptr[1]; - BpData* bp = (BpData*) bps[bp_sched2ix()]; + BpData* bp = (BpData*) bps[erts_bp_sched2ix()]; bp->orig_instr = (BeamInstr) BeamOp(op_call_nif); } code_ptr[5+1] = (BeamInstr) entry->funcs[i].fptr; -- cgit v1.2.3