termux-packages/x11-packages/qemu-common/0005-sigorset.patch

32 lines
944 B
Diff
Raw Normal View History

2018-10-26 15:19:03 +02:00
diff -uNr qemu-3.0.0/linux-user/signal.c qemu-3.0.0.mod/linux-user/signal.c
--- qemu-3.0.0/linux-user/signal.c 2018-08-14 22:10:34.000000000 +0300
2018-10-26 16:21:47 +02:00
+++ qemu-3.0.0.mod/linux-user/signal.c 2018-10-26 16:49:45.270265128 +0300
2018-10-26 15:19:03 +02:00
@@ -189,6 +189,27 @@
return atomic_xchg(&ts->signal_pending, 1);
}
+#ifdef _NSIG_WORDS
+static int sigorset(sigset_t *dest, const sigset_t *a, const sigset_t *b)
+{
+ int i;
+ if (!dest || !a || !b)
+ return -1;
+ for (i = 0; i < _NSIG_WORDS; i++)
+ dest->sig[i] = a->sig[i] | b->sig[i];
+ return 0;
+}
+#else
+static int sigorset(sigset_t *dest, const sigset_t *a, const sigset_t *b)
+{
+ int i;
+ if (!dest || !a || !b)
+ return -1;
+ *dest = *a | *b;
+ return 0;
+}
+#endif
+
/* Wrapper for sigprocmask function
* Emulates a sigprocmask in a safe way for the guest. Note that set and oldset
* are host signal set, not guest ones. Returns -TARGET_ERESTARTSYS if