From: Alan T. DeKok Date: Wed, 20 Dec 2017 13:57:16 +0000 (-0500) Subject: print dependencies in the correct order X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f71530a384a3cc12d1dcb2e2bebaeda2253ce256;p=thirdparty%2Ffreeradius-server.git print dependencies in the correct order --- diff --git a/scripts/jlibtool.c b/scripts/jlibtool.c index c1b194f8f00..809bff1859b 100644 --- a/scripts/jlibtool.c +++ b/scripts/jlibtool.c @@ -2351,6 +2351,7 @@ static int add_for_runtime(command_t *cmd) } if (cmd->output == OUT_DYNAMIC_LIB_ONLY || cmd->output == OUT_LIB) { + int i; FILE *f=fopen(cmd->fake_output_name,"w"); char *lib_so = basename((char *)cmd->module_name.normal); count_chars *dep = cmd->shared_opts.dependencies; @@ -2369,8 +2370,8 @@ static int add_for_runtime(command_t *cmd) fprintf(f,"# Libraries that this one depends upon.\n"); fprintf(f,"dependency_libs='"); - while (dep->num--) { - fprintf(f,"%s ", dep->vals[dep->num]); + for (i = 0; i < dep->num; i++) { + fprintf(f,"%s ", dep->vals[i]); } fprintf(f,"'\n\n");