From 42e47e8291ba14c076015f28ed1f11d87fc5f68e Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Fri, 10 Jan 2025 23:23:07 +0000 Subject: [PATCH] Turn off IPC support when sys/shm.h is missing, to fix compilation on Termux. --- configure.ac | 1 + docs/NEWS.md | 4 ++++ src/include/config.h.in | 3 +++ 3 files changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index 01dd07b..5e111db 100644 --- a/configure.ac +++ b/configure.ac @@ -173,6 +173,7 @@ yes if test "$IPC_SUPPORT" = "yes"; then AC_CHECK_HEADERS([sys/ipc.h], [], [IPC_SUPPORT=no]) + AC_CHECK_HEADERS([sys/shm.h], [], [IPC_SUPPORT=no]) AC_CHECK_HEADERS([sys/param.h]) if test "$IPC_SUPPORT" = "yes"; then AC_CHECK_FUNCS([shmget], [], [IPC_SUPPORT=no]) diff --git a/docs/NEWS.md b/docs/NEWS.md index 2903423..675bb73 100644 --- a/docs/NEWS.md +++ b/docs/NEWS.md @@ -1,3 +1,7 @@ +### UNRELEASED + + * *fix:* turn off IPC support if _sys/shm.h_ is not available, for compilation on Termux + ### 1.9.25 - 22 December 2024 * *fix:* test failure of **--watchfd** on macOS corrected ([#124](https://codeberg.org/a-j-wood/pv/issues/124)) diff --git a/src/include/config.h.in b/src/include/config.h.in index 15e566e..cc54819 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -194,6 +194,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SHM_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H