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.
 .
 systemd-bootchart (233-2) unstable; urgency=medium
 .
   [ Michael Biebl ]
   * Update Vcs-* to point to https://salsa.debian.org
   * Set Rules-Requires-Root to no
 .
   [ Nicolas Braud-Santoni ]
   * debian/copyright: Point to CC-1.0 license in /usr/share/common-licenses/
     (Closes: #882630)
 .
   [ Martin Pitt ]
   * debian/copyright: Use https URL for Format:
   * Bump Standards-Version to 4.1.3
   * debian/copyright: Move global wildcard section to the top.
     Fixes lintian warning
     global-files-wildcard-not-first-paragraph-in-dep5-copyright.
Author: Martin Pitt <mpitt@debian.org>
Bug-Debian: https://bugs.debian.org/882630

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

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2021-07-13

--- systemd-bootchart-233.orig/src/architecture.h
+++ systemd-bootchart-233/src/architecture.h
@@ -57,6 +57,7 @@ enum {
         ARCHITECTURE_M68K,
         ARCHITECTURE_TILEGX,
         ARCHITECTURE_CRIS,
+        ARCHITECTURE_LOONGARCH64,
         _ARCHITECTURE_MAX,
         _ARCHITECTURE_INVALID = -1
 };
@@ -194,6 +195,9 @@ int uname_architecture(void);
 #elif defined(__cris__)
 #  define native_architecture() ARCHITECTURE_CRIS
 #  error "Missing LIB_ARCH_TUPLE for CRIS"
+#elif defined(__loongarch64)
+#    define native_architecture() ARCHITECTURE_LOONGARCH64
+#    define LIB_ARCH_TUPLE "loongarch64-linux-gnu"
 #else
 #  error "Please register your architecture here!"
 #endif
--- systemd-bootchart-233.orig/src/missing.h
+++ systemd-bootchart-233/src/missing.h
@@ -44,6 +44,8 @@ static inline pid_t gettid(void) {
 #    if _MIPS_SIM == _MIPS_SIM_ABI64
 #      define __NR_getrandom 5313
 #    endif
+#  elif defined(__loongarch64)
+#    define __NR_getrandom 278
 #  else
 #    warning "__NR_getrandom unknown for your architecture"
 #    define __NR_getrandom 0xffffffff
