summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lukas.slebodnik@intrak.sk>2016-11-18 17:58:28 +0100
committerLukas Slebodnik <lslebodn@redhat.com>2016-11-25 12:51:12 +0100
commit73c9330fa3de6912e45c1ab686d5290f143b8352 (patch)
tree94df476009253b5d7602e8cb95d5cd2c8d9a6b4c
parent52cdb4275cf6c9ead9cdf746fad4276a554bc66f (diff)
downloadsssd-73c9330fa3de6912e45c1ab686d5290f143b8352.tar.gz
sssd-73c9330fa3de6912e45c1ab686d5290f143b8352.tar.xz
sssd-73c9330fa3de6912e45c1ab686d5290f143b8352.zip
sssctl: Fix missing declaration
The WEXITSTATUS is defined in stdlib.h on linux. There is a nice comment in stdlib.h: /* Define the macros <sys/wait.h> also would define this way. */ It's better to not rely on this and use more platfom friendly way with including "sys/wait.h". For example the libc on FreeBSD does not provide WEXITSTATUS in stdlib.h. I found this macro mentioned only in the manual page for wait(2) and there is mentioned just the "sys/wait.h" and not "stdlib.h" src/tools/sssctl/sssctl.c: In function 'sssctl_run_command': src/tools/sssctl/sssctl.c:110: error: implicit declaration of function 'WEXITSTATUS' gmake[2]: *** [Makefile:22383: src/tools/sssctl/sssctl-sssctl.o] Error 1 Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
-rw-r--r--src/tools/sssctl/sssctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/sssctl/sssctl.c b/src/tools/sssctl/sssctl.c
index ece1e6df1..e1cf46382 100644
--- a/src/tools/sssctl/sssctl.c
+++ b/src/tools/sssctl/sssctl.c
@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <sys/wait.h>
#include "util/util.h"
#include "tools/sssctl/sssctl.h"