This is an automatic generated email to let you know that the following patch 
were queued:

Subject: edid-decode: fix emscripten build
Author:  Hans Verkuil <hverkuil-ci...@xs4all.nl>
Date:    Fri Aug 16 12:58:02 2024 +0200

When building with emscripten, disable the i2c functionality.

Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>

 ddc.cpp         |  4 ++++
 edid-decode.cpp | 10 ++++++++++
 2 files changed, 14 insertions(+)

---

diff --git a/ddc.cpp b/ddc.cpp
index 939e968f9b2c..6bdd50b2991b 100644
--- a/ddc.cpp
+++ b/ddc.cpp
@@ -5,6 +5,8 @@
  * Author: Hans Verkuil <hverkuil-ci...@xs4all.nl>
  */
 
+#ifndef __EMSCRIPTEN__
+
 #include <cctype>
 #include <cerrno>
 #include <csignal>
@@ -344,3 +346,5 @@ int read_hdcp_ri(int adapter_fd, double ri_time)
        }
        return 0;
 }
+
+#endif
diff --git a/edid-decode.cpp b/edid-decode.cpp
index b6ff5c790e8d..11c85c77db1d 100644
--- a/edid-decode.cpp
+++ b/edid-decode.cpp
@@ -2329,6 +2329,7 @@ int main(int argc, char **argv)
                case OptDiag:
                        state.diagonal = strtod(optarg, NULL);
                        break;
+#ifndef __EMSCRIPTEN__
                case OptI2CAdapter: {
                        unsigned num = strtoul(optarg, NULL, 0);
 
@@ -2337,6 +2338,7 @@ int main(int argc, char **argv)
                                exit(1);
                        break;
                }
+#endif
                case OptI2CHDCPRi:
                        hdcp_ri_sleep = strtod(optarg, NULL);
                        break;
@@ -2444,17 +2446,25 @@ int main(int argc, char **argv)
 
        if (optind == argc) {
                if (adapter_fd >= 0 && options[OptI2CEDID]) {
+#ifndef __EMSCRIPTEN__
                        ret = read_edid(adapter_fd, edid);
+#else
+                       ret = -ENODEV;
+#endif
                        if (ret > 0) {
                                state.edid_size = ret * EDID_PAGE_SIZE;
                                state.num_blocks = ret;
                                ret = 0;
                        }
                } else if (adapter_fd >= 0) {
+#ifndef __EMSCRIPTEN__
                        if (options[OptI2CHDCP])
                                read_hdcp(adapter_fd);
                        if (options[OptI2CHDCPRi])
                                read_hdcp_ri(adapter_fd, hdcp_ri_sleep);
+#else
+                       ret = -ENODEV;
+#endif
                        ret = 0;
                } else if (options[OptInfoFrame] && !options[OptGTF]) {
                        ret = 0;

Reply via email to