aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/blogc/main.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index ff89236..880acf4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -219,7 +219,7 @@ AM_CONDITIONAL([USE_BGR_DEPS], [test "x$have_bgr_deps" = "xyes"])
BASH="$ac_cv_path_bash"
AC_SUBST(BASH)
-AC_CHECK_HEADERS([sys/resource.h sys/stat.h sys/time.h sys/wait.h time.h unistd.h])
+AC_CHECK_HEADERS([sys/resource.h sys/stat.h sys/time.h sys/wait.h time.h unistd.h sysexits.h])
AC_CHECK_FUNCS([gethostname])
AM_CONDITIONAL([HAVE_TIME_H], [test "x$ac_cv_header_time_h" = "xyes"])
diff --git a/src/blogc/main.c b/src/blogc/main.c
index 7416994..bae3c80 100644
--- a/src/blogc/main.c
+++ b/src/blogc/main.c
@@ -14,6 +14,12 @@
#include <sys/stat.h>
#endif /* HAVE_SYS_STAT_H */
+#ifdef HAVE_SYSEXITS_H
+#include <sysexits.h>
+#else
+#define EX_CONFIG 78
+#endif /* HAVE_SYSEXITS_H */
+
#include <errno.h>
#include <locale.h>
#include <stdbool.h>
@@ -301,7 +307,7 @@ main(int argc, char **argv)
if (val == NULL) {
fprintf(stderr, "blogc: error: variable not found: %s\n",
print);
- rv = 1;
+ rv = EX_CONFIG;
}
else {
printf("%s\n", val);