Here is a more detailed step-by-step for applying the my patch.
Take the patch I posted above and save it to a file (i.e. /tmp/pt-kmods-almalinux9-patch.diff).
# Make a working directory and cd into it...
mkdir pt_temp
cd pt_temp
# Copy the parallels tools files from the directory on which it is mounted.
# For instance "/run/media/<my-user-name>/Parallels Tools"
cp -a "/run/media/<my-user-name>/Parallels Tools/*" .
# Now we need to cd into the kmods directory, make it, and the
# prl_mod.tar.gz file writable
cd kmods
chmod 755 .
chmod 644 prl_mod.tar.gz
# Create a tmp directory to work in so we can untar the "prl_mod.tar.gz" file.
# The resulting unpacked directories contain the files that need to be patched.
mkdir tmp
cd tmp
tar xzf ../prl_mod.tar.gz
# Now we can apply the patch. While still in the tmp working directory,
# Run the following patch command. This example assumes the patch file
# is "/tmp/pt-kmods-almalinux9-patch.diff". Use the location of your
# patch file.
patch -p0 < /tmp/pt-kmods-almalinux9-patch.diff
# You should see output like this:
patching file ./prl_eth/pvmnet/pvmnet.c
patching file ./prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c
patching file ./prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_compat.h
# If there were no errors, you can now recreate the prl_mod.tar.gz file
# using the patched files.
tar czf ../prl_mod.tar.gz
# With the patched prl_mod.tar.gz, we can now go to the top of the pt_temp
# working directory and run the Parallels Tools command-line installer.
cd ../..
sudo ./install
# Follow the prompts to complete the Parallels Tools installation.
Good luck...