TinWoo/include/libusbhsfs/libntfs-3g/switch-libntfs-3g-2022.10.3.patch
2023-09-05 02:09:05 +01:00

90 lines
2.4 KiB
Diff

diff --git a/include/ntfs-3g/ntfstime.h b/include/ntfs-3g/ntfstime.h
index f3a89dd8..ce0d4586 100644
--- a/include/ntfs-3g/ntfstime.h
+++ b/include/ntfs-3g/ntfstime.h
@@ -36,6 +36,10 @@
#include "types.h"
+#ifdef _SYS__TIMESPEC_H_
+#define __timespec_defined
+#endif
+
/*
* assume "struct timespec" is not defined if st_mtime is not defined
*/
diff --git a/include/ntfs-3g/param.h b/include/ntfs-3g/param.h
index ebc8a0ae..6c43c230 100644
--- a/include/ntfs-3g/param.h
+++ b/include/ntfs-3g/param.h
@@ -22,6 +22,22 @@
#ifndef _NTFS_PARAM_H
#define _NTFS_PARAM_H
+#ifndef MINORBITS
+#define MINORBITS 20
+#endif
+#ifndef MINORMASK
+#define MINORMASK ((1U << MINORBITS) - 1)
+#endif
+#ifndef major
+#define major(dev) ((unsigned int) ((dev) >> MINORBITS))
+#endif
+#ifndef minor
+#define minor(dev) ((unsigned int) ((dev) & MINORMASK))
+#endif
+#ifndef makedev
+#define makedev(ma,mi) (((ma) << MINORBITS) | (mi))
+#endif
+
#define CACHE_INODE_SIZE 32 /* inode cache, zero or >= 3 and not too big */
#define CACHE_NIDATA_SIZE 64 /* idata cache, zero or >= 3 and not too big */
#define CACHE_LOOKUP_SIZE 64 /* lookup cache, zero or >= 3 and not too big */
diff --git a/libntfs-3g/Makefile.am b/libntfs-3g/Makefile.am
index 6feba7d7..83493c3a 100644
--- a/libntfs-3g/Makefile.am
+++ b/libntfs-3g/Makefile.am
@@ -55,23 +55,7 @@ libntfs_3g_la_SOURCES += unix_io.c
endif
endif
-# We may need to move .so files to root
-# And create ldscript or symbolic link from /usr
install-exec-hook: install-rootlibLTLIBRARIES
-if INSTALL_LIBRARY
- if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \
- $(MV) -f "$(DESTDIR)/$(libdir)"/libntfs-3g.so* "$(DESTDIR)/$(rootlibdir)"; \
- fi
-if GENERATE_LDSCRIPT
- if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \
- $(install_sh_PROGRAM) "libntfs-3g.script.so" "$(DESTDIR)/$(libdir)/libntfs-3g.so"; \
- fi
-else
- if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \
- $(LN_S) "$(rootlibdir)/libntfs-3g.so" "$(DESTDIR)/$(libdir)/libntfs-3g.so"; \
- fi
-endif
-endif
uninstall-local:
if INSTALL_LIBRARY
@@ -81,4 +65,3 @@ endif
if ENABLE_NTFSPROGS
libs: $(lib_LTLIBRARIES)
endif
-
diff --git a/libntfs-3g/ioctl.c b/libntfs-3g/ioctl.c
index b059a53f..a3a56722 100644
--- a/libntfs-3g/ioctl.c
+++ b/libntfs-3g/ioctl.c
@@ -48,7 +48,9 @@
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
+#ifdef HAVE_SYSLOG_H
#include <syslog.h>
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif