juliagoda / CH341SER

CH341SER driver with fixed bug

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

beautifulzzzz opened this issue · comments

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
 .`                                 `/

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, no longer necessary, line changed according to advice

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

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).

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.