40002086_AD on debian 12 build error on dgrp_tty.c

While 1.9.42 works but crashes the kernel et times,
debuild --no-lintian -b -uc -us
failes at

CC [M] /root/dgrp/work/dgrp-1.9.44/driver/build/dgrp_tty.o
/root/dgrp/work/dgrp-1.9.44/driver/build/dgrp_tty.c:252:28: error: initialization of ‘int (*)(struct tty_struct *, const unsigned char , int)’ from incompatible pointer type ‘ssize_t ()(struct tty_struct *, const u8 , size_t)’ {aka ‘long int ()(struct tty_struct *, const unsigned char *, long unsigned int)’} [-Werror=incompatible-pointer-types]
252 | .write = dgrp_tty_write,
| ^~~~~~~~~~~~~~
/root/dgrp/work/dgrp-1.9.44/driver/build/dgrp_tty.c:252:28: note: (near initialization for ‘dgrp_tty_ops.write’)
cc1: some warnings being treated as errors

same result on fresh debian 12 install

This isn’t a proper fix, but there’s some bad detection of RHEL 9.5 which is causing the issue.

If you edit line 101 of driver/2.6.27/include/linux_ver_fix.h to #define IS_RHEL_9_5 0 you will be able to build.

The full block is below. The error is due to the IS_RHEL_9_5 definition is being added on non RHEL OS’s like Debian.

#ifndef TTY_MAGIC
#define IS_RHEL_9_5 0
#else
#define IS_RHEL_9_5 0
#endif

Thanks, that did the trick \o/