Skip to content

Instantly share code, notes, and snippets.

@nanpuyue
Last active January 11, 2016 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanpuyue/7c567e923040bcd6b7c2 to your computer and use it in GitHub Desktop.
Save nanpuyue/7c567e923040bcd6b7c2 to your computer and use it in GitHub Desktop.
e2fsprogs(1.42.13) patch for cygwin
diff -ru a/configure b/configure
--- a/configure 2014-12-01 05:34:31.000000000 +0800
+++ b/configure 2016-01-12 02:51:41.574547800 +0800
@@ -4273,7 +4273,7 @@
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test "$GCC" = yes; then
+if test "$GCC" = yes && test "$host_os" != cygwin; then
RDYNAMIC="-rdynamic"
fi
diff -ru a/configure.in b/configure.in
--- a/configure.in 2014-06-26 03:19:14.000000000 +0800
+++ b/configure.in 2016-01-12 02:51:41.574547800 +0800
@@ -102,7 +102,7 @@
AC_MSG_ERROR([--with-ldopts no longer supported; use LDFLAGS= instead]))
dnl
AC_PROG_CC
-if test "$GCC" = yes; then
+if test "$GCC" = yes && test "$host_os" != cygwin; then
RDYNAMIC="-rdynamic"
AC_SUBST(RDYNAMIC)
fi
diff -ru a/lib/ext2fs/getsize.c b/lib/ext2fs/getsize.c
--- a/lib/ext2fs/getsize.c 2014-07-06 12:13:18.000000000 +0800
+++ b/lib/ext2fs/getsize.c 2016-01-12 02:51:41.590173000 +0800
@@ -59,7 +59,7 @@
#include "ext2_fs.h"
#include "ext2fs.h"
-#if defined(__CYGWIN__) || defined (WIN32)
+#if defined (WIN32)
#include "windows.h"
#include "winioctl.h"
diff -ru a/misc/Makefile.in b/misc/Makefile.in
--- a/misc/Makefile.in 2014-06-26 03:19:15.000000000 +0800
+++ b/misc/Makefile.in 2016-01-12 02:53:17.282063900 +0800
@@ -452,7 +452,7 @@
$(DESTDIR)$(root_sbindir) $(DESTDIR)$(bindir) \
$(DESTDIR)$(man1dir) $(DESTDIR)$(man8dir) \
$(DESTDIR)$(man1dir) $(DESTDIR)$(man5dir) \
- $(DESTDIR)$(libdir) $(DESTDIR)/$(root_sysconfdir)
+ $(DESTDIR)$(libdir) $(DESTDIR)$(root_sysconfdir)
install: all $(SMANPAGES) $(UMANPAGES) installdirs
$(Q) for i in $(SPROGS); do \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment