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

make error on arch linux —— ch34x.c:1294:27: error: initialization of ‘void (*)(struct tty_struct *, struct usb #30

Closed
beautifulzzzz opened this issue Jan 12, 2023 · 5 comments

Comments

@beautifulzzzz
Copy link

ERROR LOG:

➜  CH341SER git:(master) make
make -C /lib/modules/6.1.4-arch1-1/build  M=/home/btfz/CH341SER 
make[1]: Entering directory '/usr/lib/modules/6.1.4-arch1-1/build'
  CC [M]  /home/btfz/CH341SER/ch34x.o
/home/btfz/CH341SER/ch34x.c:1294:27: error: initialization of ‘void (*)(struct tty_struct *, struct usb_serial_port *, const struct ktermios *)’ from incompatible pointer type ‘void (*)(struct tty_struct *, struct usb_serial_port *, struct ktermios *)’ [-Werror=incompatible-pointer-types]
 1294 |         .set_termios    = ch34x_set_termios,
      |                           ^~~~~~~~~~~~~~~~~

edit the file CH341SER/ch34x.c

image

then

make
sudo make load

no need reboot, every thing is OK.

MY PC INFO:

➜  CH341SER git:(master) ✗ screenfetch 
                   -`                 
                  .o+`                 btfz@lt-pc
                 `ooo/                 OS: Arch Linux 
                `+oooo:                Kernel: x86_64 Linux 6.1.4-arch1-1
               `+oooooo:               Uptime: 4h 11m
               -+oooooo+:              Packages: 1688
             `/:-:++oooo+:             Shell: zsh 5.9
            `/++++/+++++++:            Resolution: 3200x1080
           `/++++++++++++++:           DE: Xfce4
          `/+++ooooooooooooo/`         WM: Xfwm4
         ./ooosssso++osssssso+`        WM Theme: Microdeck3
        .oossssso-````/ossssss+`       GTK Theme: Arc-Dark [GTK2]
       -osssssso.      :ssssssso.      Icon Theme: Numix-Circle
      :osssssss/        osssso+++.     Font: Sans 10
     /ossssssss/        +ssssooo/-     Disk: 149G / 215G (73%)
   `/ossssso+/:-        -:/+osssso+-   CPU: Intel Xeon E3-1230 V2 @ 8x 3.7GHz [39.0°C]
  `+sso+:-`                 `.-/+oso:  GPU: AMD/ATI Juniper PRO [Radeon HD 6750]
 `++:.                           `-/+/ RAM: 2909MiB / 7891MiB
 .`                                 `/
@juliagoda
Copy link
Owner

Hi, could you create pull request and send it to this repo? I will add a reference to you as an author. Unfortunately, I don't have time to take care of this repo much anymore.

@juliagoda
Copy link
Owner

ok, no longer necessary, line changed according to advice

urmilparikh added a commit to klarsys/CH341SER that referenced this issue Jan 22, 2023
@splatski
Copy link

so on linux mint 21.1 I had to remove that const to get it to compile. I was getting
ch34x.c:1294:27: error: initialization of ‘void (*)(struct tty_struct *, struct usb_serial_port *, struct ktermios *)’ from incompatible pointer type ‘void (*)(struct tty_struct *, struct usb_serial_port *, const struct ktermios *)’ [-Werror=incompatible-pointer-types] 1294 | .set_termios = ch34x_set_termios,
I figured since adding it seemed to fix it for someone I'd try removing it and that fixed it for me

juliagoda added a commit that referenced this issue Jan 23, 2023
@beautifulzzzz
Copy link
Author

Hi, could you create pull request and send it to this repo? I will add a reference to you as an author. Unfortunately, I don't have time to take care of this repo much anymore.

OK,I'll do as you say next time (I find you fix it this time).

@roboman2444
Copy link

so on linux mint 21.1 I had to remove that const to get it to compile. I was getting ch34x.c:1294:27: error: initialization of ‘void (*)(struct tty_struct *, struct usb_serial_port *, struct ktermios *)’ from incompatible pointer type ‘void (*)(struct tty_struct *, struct usb_serial_port *, const struct ktermios *)’ [-Werror=incompatible-pointer-types] 1294 | .set_termios = ch34x_set_termios, I figured since adding it seemed to fix it for someone I'd try removing it and that fixed it for me

Same thing for me... but i'm on arch (latest kernel 6.1.8-arch1-1) so that makes it all the more confusing.

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

4 participants