diff options
author | midipix <writeonce@midipix.org> | 2016-05-20 03:06:47 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-05-20 03:06:47 -0400 |
commit | 78abd7c518c43918f15e16b70af45c721d49bcd1 (patch) | |
tree | 3cf19c3566646a74fd1098d58b171424c4845df4 | |
parent | 4ecce44f5813ffef8a20c251d9bdb477e14d48a0 (diff) | |
download | slibtool-78abd7c518c43918f15e16b70af45c721d49bcd1.tar.bz2 slibtool-78abd7c518c43918f15e16b70af45c721d49bcd1.tar.xz |
slbt_get_deps_meta(): switch from fscanf to fgets.
-rw-r--r-- | src/logic/slbt_exec_link.c | 5 |
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); |