I have this ethernet card and tryed this patch on official driver (
http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3)
with description "LINUX driver for kernel 3.x and 2.6.x and 2.4.x"

If add to r8168_n.c
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
#define __devinit
#define __devexit_p(x) x
#endif
then the code still don't want to be compiled with errors in attachment
(first.log)

But if add one more line then it compiles, can be installed and works on my
PC:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
#define __devinit
#define __devexit
#define __devexit_p(x) x
#endif

Commit on kernel.org about remove this constats:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=63a29f744fe1c19742039ce7526663a98f172f7e

I added Realtek NIC software team to this thread.

Should I do something else?


2013/5/6 Andreas Beckmann <a...@debian.org>

> Control: retitle -1 r8168-dkms: fails to build module for kernel 3.8
> Control: forwarded -1 https://code.google.com/p/r8168/issues/detail?id=12
>
> > This patch works for me:
> > https://launchpadlibrarian.net/136947221/r8168-8.035.00.patch
>
> NACK.
>
> That patch seems to fix the issue for 3.8+ while potentially breaking
> the driver on older kernels.
>
> The following (added to the top of r8168_n.c) might do the job, but it
> needs to be tested:
>
> #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
> #define __devinit
> #define __devexit_p(x) x
> #endif
>
> A patch needs to be licensed under (or compatible with) GPL2.0+.
>
> And I'd like to see a reference to a kernel commit that removed these
> definitions. Or caused breakage otherwise. Or documentation about such a
> change.
>
>
> Andreas
>

Attachment: first.log
Description: Binary data

Reply via email to