diff options
author | Ross Miller <rgmiller@ornl.gov> | 2021-05-17 19:04:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 19:04:44 -0400 |
commit | 8f85d3b9372fa2b1d598a63a104eeb9012657bae (patch) | |
tree | 48899ce1f240a10aa0564a4bfd4d24305bc2aaf2 /var | |
parent | 0174936250f65bb848908c878c5348046e310306 (diff) | |
download | spack-8f85d3b9372fa2b1d598a63a104eeb9012657bae.tar.gz spack-8f85d3b9372fa2b1d598a63a104eeb9012657bae.tar.bz2 spack-8f85d3b9372fa2b1d598a63a104eeb9012657bae.tar.xz spack-8f85d3b9372fa2b1d598a63a104eeb9012657bae.zip |
Fix minor build issue with UnifyFS. (#23709)
This commit updates the UnifyFS package.py script to include a patch
that fixes the build problems on new-ish Linux distributions.
Fixes issue #23292
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/unifyfs/include-sys-sysmacros.h.patch | 43 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/unifyfs/package.py | 1 |
2 files changed, 44 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/unifyfs/include-sys-sysmacros.h.patch b/var/spack/repos/builtin/packages/unifyfs/include-sys-sysmacros.h.patch new file mode 100644 index 0000000000..f3076cfd54 --- /dev/null +++ b/var/spack/repos/builtin/packages/unifyfs/include-sys-sysmacros.h.patch @@ -0,0 +1,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 + diff --git a/var/spack/repos/builtin/packages/unifyfs/package.py b/var/spack/repos/builtin/packages/unifyfs/package.py index efbe4ee682..4fd7e192d8 100644 --- a/var/spack/repos/builtin/packages/unifyfs/package.py +++ b/var/spack/repos/builtin/packages/unifyfs/package.py @@ -57,6 +57,7 @@ class Unifyfs(AutotoolsPackage): conflicts('%xl', when='+fortran') patch('unifyfs-sysio.c.patch', when='@0.9.1') + patch('include-sys-sysmacros.h.patch', when='@0.9.1:0.9.2') # Parallel disabled to prevent tests from being run out-of-order when # installed with the --test={root, all} option. |