--- a/src/meson.build
+++ b/src/meson.build
@@ -159,7 +159,7 @@
 # Unifont Generator
 # This generates the unifont sources from raw hex-encoded font data.
 #
-genunifont = executable('genunifont', 'genunifont.c', dependencies: [zlib_deps], native: true)
+genunifont = executable('genunifont', 'genunifont.c', dependencies: [zlib_deps_native], native: true)
 
 unifont_bin = custom_target('unifont-bin',
   input: ['font_unifont_data.hex'],
--- a/meson.build
+++ b/meson.build
@@ -52,6 +52,7 @@
 dl_deps = dependency('dl')
 threads_deps = dependency('threads')
 zlib_deps = dependency('zlib')
+zlib_deps_native = dependency('zlib', native: true)
 
 python = find_program('python3')
 
@@ -148,7 +149,7 @@
 else
   docs_error_string = 'executable xsltproc was not found.'
 endif
-enable_docs = get_option('docs').require(xsltproc.found() and have_manpages_stylesheet, 
+enable_docs = get_option('docs').require(xsltproc.found() and have_manpages_stylesheet,
   error_message: docs_error_string).allowed()
 
 # Additionally check if glesv2 is needed
