aboutsummaryrefslogtreecommitdiff
This patch fixes the build of adb on linux.

Copied from archlinux repository:
https://git.archlinux.org/svntogit/community.git/tree/trunk/fix_build.patch?h=packages/android-tools

diff --git a/adb/sysdeps.h b/adb/sysdeps.h
index 75dcc86..867f3ec 100644
--- a/adb/sysdeps.h
+++ b/adb/sysdeps.h
@@ -25,6 +25,7 @@
 #endif
 
 #include <errno.h>
+#include <sys/syscall.h>
 
 #include <string>
 #include <vector>
@@ -831,7 +832,16 @@ static __inline__ int adb_is_absolute_host_path(const char* path) {
 
 static __inline__ unsigned long adb_thread_id()
 {
-    return (unsigned long)gettid();
+  // TODO: this function should be merged with GetThreadId
+#if defined(__BIONIC__)
+  return gettid();
+#elif defined(__APPLE__)
+  return syscall(SYS_thread_selfid);
+#elif defined(__linux__)
+  return syscall(__NR_gettid);
+#elif defined(_WIN32)
+  return GetCurrentThreadId();
+#endif
 }
 
 #endif /* !_WIN32 */
diff --git a/base/errors_unix.cpp b/base/errors_unix.cpp
index 296995e..48269b6 100644
--- a/base/errors_unix.cpp
+++ b/base/errors_unix.cpp
@@ -17,6 +17,7 @@
 #include "android-base/errors.h"
 
 #include <errno.h>
+#include <string.h>
 
 namespace android {
 namespace base {
diff --git a/base/file.cpp b/base/file.cpp
index da1adba..91a3901 100644
--- a/base/file.cpp
+++ b/base/file.cpp
@@ -20,6 +20,7 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <string.h>
 
 #include <string>
 
diff --git a/base/logging.cpp b/base/logging.cpp
index 1741871..e97c7f1 100644
--- a/base/logging.cpp
+++ b/base/logging.cpp
@@ -21,6 +21,7 @@
 #include "android-base/logging.h"
 
 #include <libgen.h>
+#include <string.h>
 
 // For getprogname(3) or program_invocation_short_name.
 #if defined(__ANDROID__) || defined(__APPLE__)
an class='msg-tooltip'>* gnu/packages/gnome-xyz.scm (flat-remix-icon-theme): New variable. Signed-off-by: Christopher Baines <mail@cbaines.net> Sughosha 2023-02-25gnu: Add postmarketos-theme....* gnu/packages/gnome-xyz.scm (postmarketos-theme): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> conses 2023-02-12gnu: papirus-icon-theme: Harden links before cache generation....Output is identical. This just feels moar correct. * gnu/packages/gnome-xyz.scm (papirus-icon-theme)[arguments]: Run the 'halve-inode-consumption phase before the 'install one. Tobias Geerinckx-Rice 2023-02-12gnu: papirus-icon-theme: Recursively resolve symlinks....This follows up on commit aed385e18ec7b68a0bc1bb4b173aeadc9cd97245. * gnu/packages/gnome-xyz.scm (papirus-icon-theme)[arguments]: Replace READLINK with CANONICALIZE-PATH to resolve symlink chains. Tobias Geerinckx-Rice 2023-01-29gnu: papirus-icon-theme: Reduce inode consumption....* gnu/packages/gnome-xyz.scm (papirus-icon-theme)[arguments]: Add a new 'halve-inode-consumption phase. Tobias Geerinckx-Rice 2023-01-31gnu: arc-theme: Update to 20221218....* gnu/packages/gnome-xyz.scm (arc-theme): Update to 20221218. [arguments]: Add gtk4 to the list of themes. [inputs]: Add gtk-engines. Signed-off-by: Christopher Baines <mail@cbaines.net> Sughosha 2023-01-31gnu: materia-theme: Update to 20210322....* gnu/packages/gnome-xyz.scm (materia-theme): Update to 20210322. Signed-off-by: Christopher Baines <mail@cbaines.net> Sughosha 2023-01-28gnu: papirus-icon-theme: Update to 20230104....* gnu/packages/gnome-xyz.scm (papirus-icon-theme): Update to 20230104. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Sughosha 2023-01-22gnu: gnome-shell-extension-radio: Update to 20....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-radio): Update to 20. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Sughosha 2023-01-05gnu: Add yaru-theme...* gnu/packages/gnome-xyz (yaru-theme): New variable Signed-off-by: Ludovic Courtès <ludo@gnu.org> florhizome 2022-12-24gnu: gnome-shell-extension-burn-my-windows: Update to 22....* gnu/packages/gnome-xyz (gnome-shell-extension-burn-my-windows): Update to 22. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Sughosha 2022-12-24gnu: gnome-shell-extension-vertical-overview: Update to 10....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-vertical-overview): Update to 10. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Sughosha 2022-12-24gnu: gnome-shell-extension-unite-shell: Update to 69....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-unite-shell): Update to 69. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Sughosha 2022-12-07gnu: gpaste: Update to 42.2....Fixes <https://issues.guix.gnu.org/58191>. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Attila Lendvai 2022-12-07gnu: gpaste: Fix missing @gschemasCompiled@ substitute....* gnu/packages/gnome-xyz.scm (gpaste) [phases] {fix-introspection-install-dir}: Substitute @gschemasCompiled@ placeholder. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Attila Lendvai 2022-11-25gnu: Add portfolio....* gnu/packages/gnome-xyz.scm (portfolio): New variable. Signed-off-by: Christopher Baines <mail@cbaines.net> conses 2022-10-22gnu: gnome-shell-extension-blur-my-shell: Update to 44....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-blur-my-shell): Update to 44. [source]: Remove snippet to delete compiled schemas. [arguments]<#:install-plan>: Update accordingly. <#:phases>: Remove ‘cd-src’. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Charles 2022-09-28gnu: Add gnome-shell-extension-unite-shell....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-unite-shell): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Trevor Richards 2022-09-27gnu: gnome-shell-extension-clipboard-indicator: Update to 42....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-clipboard-indicator): Update to 42. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> kiasoc5 2022-09-26gnu: gnome-shell-extension-gsconnect: Update to 50....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-gsconnect): Update to version 50. Update url references to new organization. Eric Bavier 2022-09-18gnu: gnome-shell-extension-noannoyance: Update to 16-1-b759d10f....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-noannoyance): Update to 16-1-b759d10f. Liliana Marie Prikler 2022-09-18gnu: gnome-shell-extension-burn-my-windows: Update to 21....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-burn-my-windows): Update to 21. Liliana Marie Prikler 2022-09-18gnu: gnome-shell-extension-vertical-overview: Update to 9....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-vertical-overview): Update to 9. Liliana Marie Prikler 2022-09-18gnu: gnome-shell-extension-dash-to-panel: Update to 51....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-dash-to-panel): Update to 51. Liliana Marie Prikler 2022-09-18gnu: gnome-shell-extension-just-perfection: Update to 22.0....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-just-perfection): Update to 22.0. Liliana Marie Prikler 2022-09-18gnu: gnome-shell-extension-dash-to-dock: Update to 73....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-dash-to-dock): Update to 73. Liliana Marie Prikler 2022-09-13gnu: gpaste: Update to 42.1....* gnu/packages/gnome-xyz.scm (gpaste): Update to 42.1. [meson]: Delete argument. [phases]{fix-introspection-install-dir}: Use #$output. [native-inputs]: Remove autoconf, automake and libtool. [inputs]: Remove graphene. Add gtk and libadwaita. Sort. * gnu/packages/patches/gpaste-fix-paths.patch: Update patch. Maxim Cournoyer 2022-09-13gnu: arc-theme: Update to 20220405....* gnu/packages/gnome-xyz.scm (arc-theme): Update to 20220405. [native-inputs]: Add python. Maxim Cournoyer 2022-09-13gnu: numix-gtk-theme: Remove input labels....* gnu/packages/gnome-xyz.scm (numix-gtk-theme) [native-inputs]: Delete labels. Maxim Cournoyer