summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-05-20 03:06:47 -0400
committermidipix <writeonce@midipix.org>2016-05-20 03:06:47 -0400
commit78abd7c518c43918f15e16b70af45c721d49bcd1 (patch)
tree3cf19c3566646a74fd1098d58b171424c4845df4 /src
parent4ecce44f5813ffef8a20c251d9bdb477e14d48a0 (diff)
downloadslibtool-78abd7c518c43918f15e16b70af45c721d49bcd1.tar.bz2
slibtool-78abd7c518c43918f15e16b70af45c721d49bcd1.tar.xz
slbt_get_deps_meta(): switch from fscanf to fgets.
Diffstat (limited to 'src')
-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);