blob: f3076cfd54b70b89f191599d69380c54b7be8e80 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
Commit: ef1b4caa70beb0a7ae03fc0ef1250b80efe33afc
Date: Fri, 14 May 2021 15:30:09 -0400
Subject: [PATCH] Include sys/sysmacros.h in testlib.h
In recent Linux systems, major() and minor() are defined in
sys/sysmacros.h and sys/types.h no longer includes sys/sysmacros.h. So,
we need to include sys/sysmacros.h in testlib.h.
Also adds a check for the existence of sys/sysmacros.h in configure.ac.
Include sys/sysmacros.h in testlib.h
---
configure.ac | 1 +
examples/src/testlib.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/configure.ac b/configure.ac
index 681cdb7..77719eb 100755
--- a/configure.ac
+++ b/configure.ac
@@ -65,6 +65,7 @@ AC_CHECK_HEADERS([fcntl.h inttypes.h libgen.h limits.h mntent.h strings.h syslog
AC_CHECK_HEADERS([wchar.h wctype.h])
AC_CHECK_HEADERS([sys/mount.h sys/socket.h sys/statfs.h sys/time.h])
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h])
+AC_CHECK_HEADER([sys/sysmacros.h], [], AC_MSG_ERROR([cannot find required header sys/sysmacros.h]))
# Checks for library functions.
AC_FUNC_MALLOC
diff --git a/examples/src/testlib.h b/examples/src/testlib.h
index 2b0a698..41c9900 100644
--- a/examples/src/testlib.h
+++ b/examples/src/testlib.h
@@ -24,6 +24,7 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/sysmacros.h>
#include <unistd.h>
#include <time.h>
#include <mpi.h>
--
2.25.1
|