Skip to content

patch for backend/genesys/low.cpp under FreeBSD

Note: I have only taken patches already in FreeBSD port of sane-backends and submitted here; this is not my work. From https://svnweb.freebsd.org/ports/head/graphics/sane-backends/files/patch-backend_genesys_low.cpp?view=markup&pathrev=526253

Fix build on big endian archs:

genesys/low.cpp:544:9: error: 'depth' was not declared in this scope, see

https://gitlab.com/sane-project/backends/-/merge_requests/329

Obtained from:	OpenBSD

--- backend/genesys/low.cpp.orig	2020-02-02 11:58:09 UTC
+++ backend/genesys/low.cpp
@@ -539,7 +539,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

Not sure if this patch already is in master. Hope I'm not wasting anybody's time.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information