aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--kernel/configure.ac4
-rw-r--r--kernel/dev.c19
3 files changed, 26 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a4bd92f..1b20677 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
* fusermount: fix uid checking bug. Patch by Adam Connell
+ * KERNEL: fix compile on various RedHad patched 2.4 kernels.
+ Patch by Keshava Gowda
+
2005-01-20 Miklos Szeredi <miklos@szeredi.hu>
* KERNEL: provide correct llseek semantics for fuse device (fixes
diff --git a/kernel/configure.ac b/kernel/configure.ac
index a9f1ee8..1358f47 100644
--- a/kernel/configure.ac
+++ b/kernel/configure.ac
@@ -50,6 +50,10 @@ if echo "$kernsrcver" | grep -q "^2.4"; then
AC_DEFINE(HAVE_I_SIZE_FUNC, 1,
[Kernel has i_size_read() and i_size_write() functions]),,
[#include <linux/fs.h>])
+ AC_CHECK_DECL(recalc_sigpending_tsk,
+ AC_DEFINE(HAVE_RECALC_SIGPENDING_TSK, 1,
+ [Kernel has recalc_sigpending_tsk() function]),,
+ [#include <linux/sched.h>])
CFLAGS="$old_cflags"
else
fuse_configured=no
diff --git a/kernel/dev.c b/kernel/dev.c
index ef46eb9..8ce078b 100644
--- a/kernel/dev.c
+++ b/kernel/dev.c
@@ -65,6 +65,24 @@ static inline void restore_sigs(sigset_t *oldset)
sigprocmask(SIG_SETMASK, oldset, NULL);
}
#else
+#ifdef HAVE_RECALC_SIGPENDING_TSK
+static inline void block_sigs(sigset_t *oldset)
+{
+ spin_lock_irq(&current->sighand->siglock);
+ *oldset = current->blocked;
+ siginitsetinv(&current->blocked, sigmask(SIGKILL) & ~oldset->sig[0]);
+ recalc_sigpending();
+ spin_unlock_irq(&current->sighand->siglock);
+}
+
+static inline void restore_sigs(sigset_t *oldset)
+{
+ spin_lock_irq(&current->sighand->siglock);
+ current->blocked = *oldset;
+ recalc_sigpending();
+ spin_unlock_irq(&current->sighand->siglock);
+}
+#else
static inline void block_sigs(sigset_t *oldset)
{
spin_lock_irq(&current->sigmask_lock);
@@ -82,6 +100,7 @@ static inline void restore_sigs(sigset_t *oldset)
spin_unlock_irq(&current->sigmask_lock);
}
#endif
+#endif
void fuse_reset_request(struct fuse_req *req)
{