]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
print dependencies in the correct order
authorAlan T. DeKok <aland@freeradius.org>
Wed, 20 Dec 2017 13:57:16 +0000 (08:57 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 20 Dec 2017 14:10:47 +0000 (09:10 -0500)
scripts/jlibtool.c

index c1b194f8f00f59492640e67bd3b59cfaa308f203..809bff1859bf7b2b8ce3e08859fa00ff4db53c93 100644 (file)
@@ -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");