summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Popov <6yearold@gmail.com>2020-10-12 18:50:00 +0400
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-10-15 09:59:38 +0200
commit30a5d201144cba04dd708c11d87cc5517c04c0c3 (patch)
tree1a0802d110492a76db514e9e65d8e6092c52b2d5
parente64daeda4423255105116606fff4be5069eb6fbf (diff)
Do not include <sys/sysmacros.h> header unconditionally, but perform a check for it in the configure script.
This header is missing at least on FreeBSD. Change-Id: Iecb8c35e2ea8af84cf1488334a4d39ba0b5af7e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104214 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r--configure.ac5
-rw-r--r--desktop/unx/source/pagein.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7449a78f7962..180200f0d2ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5289,6 +5289,11 @@ dnl Check for syslog header
dnl ===================================================================
AC_CHECK_HEADER(syslog.h, AC_DEFINE(HAVE_SYSLOG_H))
+dnl ===================================================================
+dnl Check for sysmacros header
+dnl ===================================================================
+AC_CHECK_HEADER(sys/sysmacros.h, AC_DEFINE(HAVE_SYS_SYSMACROS_H))
+
dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
dnl ===================================================================
AC_MSG_CHECKING([whether to turn warnings to errors])
diff --git a/desktop/unx/source/pagein.c b/desktop/unx/source/pagein.c
index 03aa50d99c9d..2f42fd1df9dc 100644
--- a/desktop/unx/source/pagein.c
+++ b/desktop/unx/source/pagein.c
@@ -25,7 +25,9 @@
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
+#ifdef HAVE_SYS_SYSMACROS_H
#include <sys/sysmacros.h>
+#endif
#include <sys/types.h>
/* do_pagein */