$OpenBSD: patch-backend_genesys_low_cpp,v 1.2 2020/02/09 20:33:40 cwen Exp $

errno.h header is required now that errno is a per-thread variable.
"undefined symbol 'errno'" at runtime with dlopen()'d modules.

Fix the build on BE_ARCHS:
genesys/low.cpp:544:9: error: 'depth' was not declared in this scope, see
https://gitlab.com/sane-project/backends/-/merge_requests/329

Index: backend/genesys/low.cpp
--- backend/genesys/low.cpp.orig
+++ backend/genesys/low.cpp
@@ -44,6 +44,8 @@
 
 #define DEBUG_DECLARE_ONLY
 
+#include <errno.h>
+
 #include "low.h"
 #include "assert.h"
 #include "test_settings.h"
@@ -539,7 +541,7 @@ Image read_unshuffled_image_from_scanner(Genesys_Devic
     }
 
 #ifdef WORDS_BIGENDIAN
-    if (depth == 16) {
+    if (session.params.depth == 16) {
         dev->pipeline.push_node<ImagePipelineNodeSwap16BitEndian>();
     }
 #endif
