VMware vmmon & vmnet 17.5.1 and Linux kernel 6.8.0 won't compile

After upgrading to kernel 6.8.0,
VMware’s vmmon and vmnet couldn’t compile, giving the following error:

/tmp/vmware-host-modules-w17.5.1/vmmon-only/common/task.c:548:1: warning: no previous prototype for ‘TaskGetFlatWriteableDataSegment’ [-Wmissing-prototypes]
  548 | TaskGetFlatWriteableDataSegment(void)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/vmware-host-modules-w17.5.1/vmmon-only/common/task.o: warning: objtool: .text: unexpected end of section
  CC [M]  /tmp/vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.o
In file included from /tmp/vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c:52:
./arch/x86/include/asm/timex.h: In function ‘random_get_entropy’:
./arch/x86/include/asm/timex.h:12:24: error: implicit declaration of function ‘random_get_entropy_fallback’; did you mean ‘random_get_entropy’? [-Werror=implicit-function-declaration]
   12 |                 return random_get_entropy_fallback();
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                        random_get_entropy
Asked By: lucasart


Mkubecek‘s plain patch on the community forum for VMware 17.5.1 couldn’t compile either. 
On his website at Kernel – 6.8 Released – OK with latest NVIDIA and Patched VMware, there’s a link titled modules: fix build with -Wmissing-prototypes to patch VMware 17.5.1, which fixes that compilation error, among others.

Hit the green [ <> Code ] button, download the zip file,
unzip it somewhere on the local disk, e.g., /tmp/;

# unzip vmware-host-modules-workstation-17.5.1.zip
# cd vmware-host-modules-workstation-17.5.1/
# make
# make install
# /etc/init.d/vmware restart
Stopping VMware services:
   VMware Authentication Daemon                                        done
   Virtual machine monitor                                             done
Starting VMware services:
   Virtual machine monitor                                             done
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Virtual ethernet                                                    done
   VMware Authentication Daemon                                        done
   Shared Memory Available                                             done

Start VMware:

# vmware
Answered By: lucasart
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.