When you upgrade your linux kernel to 3.10.x, and try to install the latest Nvidia driver, say 319.17 for Linux-x86_64, it will fail in building the kernel driver with error message in the built log like this:
/tmp/selfgz8190/NVIDIA-Linux-x86_64-304.88/kernel/nv-i2c.c: In function ‘nv_i2c_del_adapter’:
/tmp/selfgz8190/NVIDIA-Linux-x86_64-304.88/kernel/nv-i2c.c:327:14: error: void value not ignored as it ought to be
make: *** [/tmp/selfgz8190/NVIDIA-Linux-x86_64-304.88/kernel/nv-i2c.o] Error 1
make: *** [_module_/tmp/selfgz8190/NVIDIA-Linux-x86_64-304.88/kernel] Error 2
make: *** [sub-make] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [module] Error 1
make: *** [module] Error 2
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed. Please see the file ‘/var/log/nvidia-installer.log’ for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
This is because the 3.10 kernels have some .h files changed and created some incompatibility. The work around is to replace two files in the /tmp/selfgz????/NVIDIA-Linux-x86_64-304.88/kernel with the following:
after started the installation process and before grant the installation to build kernel driver module.
These two files were created from a patch found on the internet but the patch was not easy to be applied to nvidia driver installation packages with different time stamps. Better to just copy these two files over.
This has been tested working on Fedora 19 with kernel 3.10.3-300.fc19.x86_64.