master ca9a966157a: Fix build failure with no window system

Alan Third <[email protected]>
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: master
commit ca9a966157a8ee4901ff9ff510dbef6ec1838d71
Author: Divya Ranjan Pattanaik <[email protected]>
Commit: Alan Third <[email protected]>

    Fix build failure with no window system
    
    * src/emacs-module.c (module_canvas_data): Exclude any canvas specific
    code when HAVE_WINDOW_SYSTEM is undefined.
---
 src/emacs-module.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/emacs-module.c b/src/emacs-module.c
index 1adf0ad6e5b..75333cdaad2 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -965,8 +965,13 @@ module_vec_size (emacs_env *env, emacs_value vector)
 static uint32_t *
 module_canvas_data (emacs_env *env, emacs_value canvas)
 {
+  uint32_t *data = 0;
   MODULE_FUNCTION_BEGIN (NULL);
-  uint32_t *data = canvas_data (value_to_lisp (canvas));
+#ifdef HAVE_WINDOW_SYSTEM
+  data = canvas_data (value_to_lisp (canvas));
+#else
+  error ("Canvas: No window system");
+#endif
   MODULE_INTERNAL_CLEANUP ();
   return data;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.