Description of problem: SC_CLK_TCK not defined on IA64, causing builds to fail Version-Release number of selected component (if applicable): kernel 2.6.9-42.EL glibc-kernheaders-2.4-9.1.98 How reproducible: always Steps to Reproduce: 1.try to build ttcp-1.12 2. Get error message below 3. Actual results: make[1]: Entering directory `/usr/src/redhat/BUILD/stress-kernel/ttcp-1.12' gcc -O2 -funroll-loops -o ttcp ttcp.c ttcp.c: In function `main': ttcp.c:271: warning: cast from pointer to integer of different size ttcp.c: In function `getrusage': ttcp.c:532: error: `_SC_CLK_TCK' undeclared (first use in this function) ttcp.c:532: error: (Each undeclared identifier is reported only once ttcp.c:532: error: for each function it appears in.) make[1]: *** [ttcp] Error 1 make[1]: Leaving directory `/usr/src/redhat/BUILD/stress-kernel/ttcp-1.12' error: Bad exit status from /var/tmp/rpm-tmp.71190 (%build) Expected results: Build completes, ttcp builds on all other arch's Additional info: Patch created by Joshua Giles that fixes the problem: --- param.h.orig 2006-07-27 08:31:05.000000000 -0400 +++ param.h 2006-07-27 08:30:46.000000000 -0400 @@ -8,8 +8,11 @@ * Copyright (C) 1998, 1999 David Mosberger-Tang <davidm.com> */ -# define HZ sysconf(_SC_CLK_TCK) +#include <unistd.h> +#ifndef HZ +#define HZ sysconf(_SC_CLK_TCK) +#endif #define EXEC_PAGESIZE 65536
Userspace must not poke in private kernel headers -- ttcp is broken. If you want sysconf(_SC_CLK_TCK) then use it properly. The man page for sysconf(3) tells you to include unistd.h. We _could_ add the #include <unistd.h> to accommodate one set of broken users, but that would probably break another set of broken users. It's best just to leave it as it is. HZ is not a documented interface. You'll get away with abusing it for now if you include unistd.h for yourself, but don't count on it lasting.