tag 428927 patch thanks Michael Mende <[EMAIL PROTECTED]> (25/06/2007): > please add linux-kernel-headers to your build dependencies. This will > solve the problem.
Hi, l-k-h is being dropped, that's why MadCoder removed the patch tag. > FYI: /usr/include/linux/version.h is provided both by > linux-kernel-headers and linux-libc-dev. But only > linux-kernel-headers' version.h contains the UTS_RELEASE constant that > is needed by configure script to get the right linux minor version. > Without this build starts assuming linux 2.2. Please find attached a patch to fix this. It works OK on 2.6.* and I believe that it should break systems where UTS_RELEASE is defined. Cheers, -- Cyril Brulebois
--- keepalived-1.1.12~/configure.in 2005-02-28 23:25:03.000000000 +0000
+++ keepalived-1.1.12/configure.in 2007-07-24 15:52:06.000000000 +0000
@@ -57,7 +57,13 @@
int main (void) {
FILE *fp = fopen ("linuxinfo", "w");
if (!fp) return 1;
+ #if defined(UTS_RELEASE)
fprintf (fp, "%s\n", UTS_RELEASE);
+ #elif defined(LINUX_VERSION_CODE)
+ fprintf (fp, "%d.%d.%d\n", LINUX_VERSION_CODE >> 16, (LINUX_VERSION_CODE >> 8) & 0xFF, LINUX_VERSION_CODE & 0xFF);
+ #else
+ fprintf (fp, "0.0.0\n"); /* Let's fail gently */
+ #endif
fclose (fp);
return 0;
}
pgpJqjUBW5H1z.pgp
Description: PGP signature

