summaryrefslogtreecommitdiff
path: root/src/android/mm/libhardware_stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/mm/libhardware_stub.c')
-rw-r--r--src/android/mm/libhardware_stub.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/android/mm/libhardware_stub.c b/src/android/mm/libhardware_stub.c
new file mode 100644
index 00000000..00f15cd9
--- /dev/null
+++ b/src/android/mm/libhardware_stub.c
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: Apache-2.0 */
+/*
+ * Copyright (C) 2023, Ideas on Board
+ *
+ * libhardware_stub.c - Android libhardware stub for test compilation
+ */
+
+#include <errno.h>
+
+#include <hardware/hardware.h>
+
+int hw_get_module(const char *id __attribute__((__unused__)),
+ const struct hw_module_t **module)
+{
+ *module = NULL;
+ return -ENOTSUP;
+}