From b45d2309d36aa1fc3fa7961c0f786b50ab1a914e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 20 Apr 2014 21:59:48 +0200 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mds.c b/src/mds.c index 95cd6da..ff60043 100644 --- a/src/mds.c +++ b/src/mds.c @@ -27,6 +27,7 @@ #include #include #include +#include /** @@ -99,7 +100,7 @@ int main(int argc_, const char** argv_) perror(*argv); continue; } - read_len = read(piddata, 1, sizeof(piddata) / sizeof(char), f); + read_len = fread(piddata, 1, sizeof(piddata) / sizeof(char), f); if (ferror(f)) /* Failed to read. */ perror(*argv); else if (feof(f) == 0) /* Did not read everything. */ -- cgit v1.2.3-70-g09d2