[sane-devel] failing make sane-backends-1.0.18; sanei_scsi question]

Johannes Meixner jsmeix at suse.de
Fri Jan 19 15:31:28 CET 2007


Hello,

On Jan 19 15:00 Julien Michielsen wrote (shortened):
> sanei_scsi.c:1276: error: 'HZ' undeclared (first use in this function)

This patch replaces the fixed HZ compile-time value (which is
no longer supported by new glibc) by the more correct
sysconf(_SC_CLK_TCK) runtime value because a fixed HZ compile-time
value may be wrong in the running system if the runtime system
is not exactly the same as the compile-time system:
---------------------------------------------------------------------
--- sanei/sanei_scsi.c.orig     2005-04-22 10:36:17.000000000 +0200
+++ sanei/sanei_scsi.c  2006-07-04 10:16:49.000000000 +0200
@@ -1273,7 +1273,7 @@
      disconnect... ;-( */
   {
     int timeout;
-    timeout = sane_scsicmd_timeout * HZ;
+    timeout = sane_scsicmd_timeout * sysconf(_SC_CLK_TCK);
     ioctl (fd, SG_SET_TIMEOUT, &timeout);
   }
 #endif
---------------------------------------------------------------------


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5      Mail: jsmeix at suse.de
90409 Nuernberg, Germany                    WWW: http://www.suse.de/



More information about the sane-devel mailing list