summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/logic/slbt_exec_link.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index d3744f5..d279997 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -86,6 +86,7 @@ static int slbt_get_deps_meta(
int ret;
FILE * fdeps;
struct stat st;
+ char * deplib;
char depfile[4*PATH_MAX];
char * deplibs = depfile;
@@ -122,8 +123,10 @@ static int slbt_get_deps_meta(
depsmeta->infolen += st.st_size;
depsmeta->infolen++;
- while (fscanf(fdeps,"%s\n",deplibs) == 1)
+ for (deplib=fgets(deplibs,st.st_size+1,fdeps); deplib; ) {
depsmeta->depscnt++;
+ deplib = fgets(deplibs,st.st_size+1,fdeps);
+ }
if (deplibs != depfile)
free(deplibs);