From c1285c55a17877cf50ff816d26208b9a68d8c913 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Feb 28 2017 18:40:05 +0000 Subject: Tests: Fix compillation of addcinfo CC addcinfo-addcinfo.o addcinfo.c: In function 'main': addcinfo.c:74: warning: implicit declaration of function 'read' addcinfo.c:74: error: 'STDIN_FILENO' undeclared (first use in this function) addcinfo.c:74: error: (Each undeclared identifier is reported only once addcinfo.c:74: error: for each function it appears in.) addcinfo.c:102: warning: implicit declaration of function 'write' addcinfo.c:102: error: 'STDOUT_FILENO' undeclared (first use in this function) The manaul page for function read/write says that the header file unistd.h needs to be included. This header file was indirectly included on Linux but it was not included on FreeBSD. It is better to include it directly and do not rely on other header files. Signed-off-by: Nalin Dahyabhai --- diff --git a/tests/tools/addcinfo.c b/tests/tools/addcinfo.c index 1868041..d3cea2c 100644 --- a/tests/tools/addcinfo.c +++ b/tests/tools/addcinfo.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include