aboutsummaryrefslogblamecommitdiffstats
path: root/community/monado/fix-build.patch
blob: 660b4140ef6edd055c4d4b33d72d3a408c9963e8 (plain) (tree)


































































                                                                                                            
From 2f0ff0c38e6f815a38c1ac5c45af19361f6df2d9 Mon Sep 17 00:00:00 2001
From: Christoph Haag <christoph.haag@collabora.com>
Date: Mon, 15 Feb 2021 21:42:37 +0100
Subject: [PATCH 1/2] d/remote: define _BSD_SOURCE for SOL_TCP on musl

---
 src/xrt/drivers/remote/r_hub.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/xrt/drivers/remote/r_hub.c b/src/xrt/drivers/remote/r_hub.c
index ab0517c90..7de2716bf 100644
--- a/src/xrt/drivers/remote/r_hub.c
+++ b/src/xrt/drivers/remote/r_hub.c
@@ -25,8 +25,9 @@
 #include <arpa/inet.h>
 #include <netinet/in.h>
 
-#ifndef __USE_MISC
+#if !defined(__USE_MISC) || !defined(_BSD_SOURCE)
 #define __USE_MISC // SOL_TCP on C11
+#define _BSD_SOURCE // same, but for musl
 #endif
 
 #include <netinet/tcp.h>
-- 
GitLab


From 5346745bd2108b3c86e9c73f56a6bcb741357029 Mon Sep 17 00:00:00 2001
From: Christoph Haag <christoph.haag@collabora.com>
Date: Mon, 15 Feb 2021 21:43:32 +0100
Subject: [PATCH 2/2] build/meson: Explicitly depend on generated binding
 header

fixes header not being generated on alpine
---
 src/xrt/auxiliary/bindings/meson.build         | 1 +
 src/xrt/state_trackers/steamvr_drv/meson.build | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/xrt/auxiliary/bindings/meson.build b/src/xrt/auxiliary/bindings/meson.build
index 2cb8c20b1..af3e54566 100644
--- a/src/xrt/auxiliary/bindings/meson.build
+++ b/src/xrt/auxiliary/bindings/meson.build
@@ -35,5 +35,6 @@ lib_aux_generated_bindings = static_library(
 
 aux_generated_bindings = declare_dependency(
 	include_directories: aux_include,
+	sources: [generated_bindings_h],
 	link_with: lib_aux_generated_bindings,
 )
diff --git a/src/xrt/state_trackers/steamvr_drv/meson.build b/src/xrt/state_trackers/steamvr_drv/meson.build
index 17aa5806b..773608d1e 100644
--- a/src/xrt/state_trackers/steamvr_drv/meson.build
+++ b/src/xrt/state_trackers/steamvr_drv/meson.build
@@ -14,7 +14,7 @@ lib_st_ovrd = static_library(
 		st_include, # Sigh debian meson requires this.
 		xrt_include,
 	],
-	dependencies: aux_util,
+	dependencies: [aux_util, aux_generated_bindings],
 	c_args: compile_args,
 	cpp_args: compile_args,
 )
-- 
GitLab