List Info

Thread: Re:




Re:
user name
2007-01-19 08:31:28
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:
jsmeixsuse.de
90409 Nuernberg, Germany                    WWW: http://www.suse.de/

-- 
sane-devel mailing list: sane-devellists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-d
evel
Unsubscribe: Send mail with subject "unsubscribe
your_password"
             to sane-devel-requestlists.alioth.debian.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )