[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[BUG] dvd+rw-tools compile failure with linux-headers-2.6.23



When building dvd+rw-tools on an "unstable" Gentoo GNU/Linux system with Linux headers derived from a 2.6.23 kernel, there are compilation errors due to INT_MAX being undefined. This can be fixed by adding '#include <limits.h>' to growisofs.c and transport.hxx, at least in the GNU/Linux-specific parts of those files.

The definitions of the CDSL_CURRENT and CDSL_NONE macros changed in the 2.6.23 kernel sources <linux/cdrom.h>. They are now defined in terms of INT_MAX, whereas previously they were based on casting an unsigned integer constant numerically equal to INT_MAX.

<linux/cdrom.h> 2.6.22:

/* Special codes used when specifying changer slots. */
#define CDSL_NONE               ((int) (~0U>>1)-1)
#define CDSL_CURRENT            ((int) (~0U>>1))

<linux/cdrom.h> 2.6.23:

/* Special codes used when specifying changer slots. */
#define CDSL_NONE               (INT_MAX-1)
#define CDSL_CURRENT            INT_MAX

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-



Reply to: