Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't compile on newer Linux kernel #3

Open
rbalik opened this issue Jan 13, 2023 · 5 comments
Open

Doesn't compile on newer Linux kernel #3

rbalik opened this issue Jan 13, 2023 · 5 comments

Comments

@rbalik
Copy link

rbalik commented Jan 13, 2023

Building on kernel 5.15.84

We get this output. Sounds like some of these functions were changed in the newer kernel

/home/pi/xr-usb-serial-master/xr_usb_serial_common.c:1918:17: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
 1918 |  .write_room =  xr_usb_serial_tty_write_room,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/xr-usb-serial-master/xr_usb_serial_common.c:1918:17: note: (near initialization for ‘xr_usb_serial_ops.write_room’)
/home/pi/xr-usb-serial-master/xr_usb_serial_common.c:1922:21: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
 1922 |  .chars_in_buffer = xr_usb_serial_tty_chars_in_buffer,
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/xr-usb-serial-master/xr_usb_serial_common.c:1922:21: note: (near initialization for ‘xr_usb_serial_ops.chars_in_buffer’)
/home/pi/xr-usb-serial-master/xr_usb_serial_common.c: In function ‘xr_usb_serial_init’:
/home/pi/xr-usb-serial-master/xr_usb_serial_common.c:1936:29: error: implicit declaration of function ‘alloc_tty_driver’ [-Werror=implicit-function-declaration]
 1936 |  xr_usb_serial_tty_driver = alloc_tty_driver(XR_USB_SERIAL_TTY_MINORS);
      |                             ^~~~~~~~~~~~~~~~
/home/pi/xr-usb-serial-master/xr_usb_serial_common.c:1936:27: warning: assignment to ‘struct tty_driver *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 1936 |  xr_usb_serial_tty_driver = alloc_tty_driver(XR_USB_SERIAL_TTY_MINORS);
      |                           ^
/home/pi/xr-usb-serial-master/xr_usb_serial_common.c:1953:3: error: implicit declaration of function ‘put_tty_driver’ [-Werror=implicit-function-declaration]
 1953 |   put_tty_driver(xr_usb_serial_tty_driver);
      |   ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors

@ColinFinck
Copy link
Contributor

As of now, this repo is only targeting the long-term 5.4.x kernel series.
A fix for 5.15.x has been generously provided by @valinet in #2

@ccera-astro
Copy link

Ubuntu 22.04 is currently shipping 6.2.0 kernels. Anyone know if the PR from @valinet will apply?

@Freax13
Copy link
Contributor

Freax13 commented Jun 13, 2024

Has this been fixed by c29ea96

@rany2
Copy link

rany2 commented Aug 4, 2024

Works fine for me on 6.6, thanks for maintaining this!

@rany2
Copy link

rany2 commented Aug 16, 2024

BTW this module isn't needed on 6.8 onwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants