MSYS2-packages/cygutils/lssparse-support-check.patch
Jeremy Drake b00d232ca2 cygutils: update to 1.4.17.4
Corresponds to Cygwin's 1.4.17-4.

Additional patch to not build lssparse if SEEK_HOLE is not defined in
unistd.h, as it is not on runtime versions < 3.6.
2025-04-24 13:37:07 -07:00

36 lines
1.1 KiB
Diff

--- a/Makefile.am 2025-04-24 13:03:35.750405000 -0700
+++ b/Makefile.am 2025-04-24 13:24:52.995906000 -0700
@@ -32,9 +32,13 @@
cygwin_specific_progs = src/cygdrop/cygdrop
endif
+if WITH_LSSPARSE
+lssparse_progs = src/lssparse/lssparse
+endif
+
bin_PROGRAMS = $(windows_progs) src/conv/conv \
src/dump/dump $(ipc_progs) \
- src/lssparse/lssparse \
+ $(lssparse_progs) \
$(cygwin_specific_progs)
bin_SCRIPTS = $(ipc_scripts)
--- a/configure.ac
+++ b/configure.ac
@@ -82,6 +82,7 @@ case "$host" in
*cygwin* ) AC_MSG_ERROR([At least cygwin-1.7 is required]) ;;
esac],dnl
[[#include <sys/cygwin.h>]])
+AC_CHECK_DECL([SEEK_HOLE],[],[],[[#include <unistd.h>]])
dnl Set Conditionals for Makefile.am
AM_CONDITIONAL(WITH_WINDOWS_PROGRAMS, test "$ac_cv_func_OpenClipboard" = yes)
@@ -91,6 +92,7 @@ case "$host" in
*cygwin* ) host_is_cygwin=yes ;;
esac
AM_CONDITIONAL(WITH_CYGWIN_SPECIFIC_PROGRAMS, test "$host_is_cygwin" = yes)
+AM_CONDITIONAL(WITH_LSSPARSE, test "$ac_cv_have_decl_SEEK_HOLE" = yes)
AC_CONFIG_FILES([Makefile po/Makefile.in src/cygicons/cygicons.rc])