Problems compiling usb camera driver

Hello

I downloaded the source code of a driver for an usb camera from https://sourceforge.net/p/usb-quickcam-vc/code/?source=navbar. I could compile it on kernels 3.1.x and it worked fine. If i try to compile it on openSUSE Leab 42.1 i get the following errors:

mkdir -p .tmp_versions
cp /lib/modules/4.1.27-27-default/build/.tmp_versions/*.mod /home/amadrits/Temp/qcamvc/linux_2.6/.tmp_versions
cp: der Aufruf von stat für „/lib/modules/4.1.27-27-default/build/.tmp_versions/*.mod“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
Makefile:45: recipe for target 'modules' failed
make: [modules] Error 1 (ignored)
make -C /lib/modules/4.1.27-27-default/build SUBDIRS=/home/amadrits/Temp/qcamvc/linux_2.6 MODVERDIR=/home/amadrits/Temp/qcamvc/linux_2.6/.tmp_versions modules
make[1]: Entering directory '/usr/src/linux-4.1.27-27-obj/x86_64/default'
  CC [M]  /home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.o
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c:121:2: error: unknown field ‘ioctl’ specified in initializer
  .ioctl  = qcamvc_vioctl,
  ^
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c:121:2: warning: excess elements in struct initializer [enabled by default]
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c:121:2: warning: (near initialization for ‘qcamvc_fops’) [enabled by default]
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c: In function ‘create_proc_qcamvc_cam’:
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c:1462:2: error: implicit declaration of function ‘create_proc_entry’ -Werror=implicit-function-declaration]
  ent = create_proc_entry(name, S_IFREG|S_IRUGO|S_IWUSR, qcamvc_proc_root);
  ^
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c:1462:6: warning: assignment makes pointer from integer without a cast [enabled by default]
  ent = create_proc_entry(name, S_IFREG|S_IRUGO|S_IWUSR, qcamvc_proc_root);
      ^
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c:1469:5: error: dereferencing pointer to incomplete type
  ent->data = qcamvc;
     ^
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c:1470:5: error: dereferencing pointer to incomplete type
  ent->read_proc = qcamvc_read_proc;
     ^
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c:1471:5: error: dereferencing pointer to incomplete type
  ent->write_proc = qcamvc_write_proc;
     ^
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c:1473:5: error: dereferencing pointer to incomplete type
  ent->size = 0;
     ^
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c: In function ‘proc_qcamvc_create’:
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c:1491:19: warning: assignment makes pointer from integer without a cast [enabled by default]
  qcamvc_proc_root = create_proc_entry("qcamvc", S_IFDIR, 0);
                   ^
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c: In function ‘qcamvc_vopen’:
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c:1557:21: error: dereferencing pointer to incomplete type
   qcamvc->proc_entry->uid =
                     ^
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c: In function ‘qcamvc_vrelease’:
/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.c:1580:22: error: dereferencing pointer to incomplete type
    qcamvc->proc_entry->uid = 0;
                      ^
cc1: some warnings being treated as errors
/usr/src/linux-4.1.27-27/scripts/Makefile.build:281: recipe for target '/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.o' failed
make[4]: *** [/home/amadrits/Temp/qcamvc/linux_2.6/qcamvc.o] Error 1
/usr/src/linux-4.1.27-27/Makefile:1411: recipe for target '_module_/home/amadrits/Temp/qcamvc/linux_2.6' failed
make[3]: *** [_module_/home/amadrits/Temp/qcamvc/linux_2.6] Error 2
Makefile:146: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:24: recipe for target '__sub-make' failed
make[1]: *** [__sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-4.1.27-27-obj/x86_64/default'
Makefile:45: recipe for target 'modules' failed
make: *** [modules] Error 2

Is there a compat package missing? Do i have to adapt the driver for the new kernel? Any suggestions for reading?

Am Tue, 02 Aug 2016 20:06:01 GMT
schrieb amadrits <amadrits@no-mx.forums.microfocus.com>:

> Hello
>
> I downloaded the source code of a driver for an usb camera from
> https://sourceforge.net/p/usb-quickcam-vc/code/?source=navbar. I could
> compile it on kernels 3.1.x and it worked fine.

Short answer:

If you don’t have some experience in kernel driver development/hacking, forget
it.

(At least for any kernel > 3.10)

AK


Never attribute to malice that which can be adequately explained by stupidity.
(R.J. Hanlon)