Simply add .patch suffix to commit url to download patch file
https://github.com/contiki-os/contiki/commit/e4ccf4fcf7a9d1ea2c3854b43a440e768ba1dd40.patch git am < e4ccf4fcf7a9d1ea2c3854b43a440e768ba1dd40.patch