Source: zathura
Severity: normal
Tags: patch
User: debian-loonga...@lists.debian.org
Usertags: loong64
X-Debbugs-Cc: wuruil...@loongson.cn

Dear Maintainer,

zathura compiled incorrectly on loongarch architecture, the attached patch 
solved the above problem and compiled successfully. Please refer to patch to 
modify the code.

wuruilong

-- System Information:
Debian Release: trixie/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: loong64 (loongarch64)

Kernel: Linux 5.10.0-60.96.0.126.oe2203.loongarch64 (SMP w/32 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 zathura (0.5.6-1) unstable; urgency=medium
 .
   * Upload to unstable
   * New upstream version 0.5.6
   * debian/control: Bump Standards version
Author: Sebastian Ramacher <sramac...@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2024-05-13

--- zathura-0.5.6.orig/zathura/seccomp-filters.c
+++ zathura-0.5.6/zathura/seccomp-filters.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <girara/utils.h>
 #include <linux/sched.h> /* for clone filter */
+#include <unistd.h>
 
 #ifdef GDK_WINDOWING_X11
 #include <gtk/gtkx.h>
@@ -74,7 +75,9 @@ seccomp_enable_strict_filter(zathura_t*
   /* ALLOW_RULE(fadvise64); */
   ALLOW_RULE(fallocate);
   ALLOW_RULE(fcntl);  /* TODO: build detailed filter */
+#ifdef __NR_fstat
   ALLOW_RULE(fstat); /* used by older libc, stat (below), lstat(below), 
fstatat, newfstatat(below) */
+#endif
   ALLOW_RULE(fstatfs); /* statfs (below) */
   ALLOW_RULE(ftruncate);
   ALLOW_RULE(futex);

Reply via email to