Errors compiling suggested sample code for cuDNN under Ubuntu

Nvidia’s cuDNN installation doc recommends testing successful
install by compiling the mnistCUDNN project from cudnn_samples_v7.
This generates a chain of errors, documented here:


Suggested fix:

run sudo emacs /usr/local/cuda/include/cuda_runtime_api.h

Before this line:

typedef void (CUDART_CB *cudaStreamCallback_t)(cudaStream_t stream, cudaError_t status, void *userData);

add this code

#ifdef _WIN32
#define CUDART_CB __stdcall
#else
#define CUDART_CB
#endif


and here:

and here:

Suggested fix:

Open the file:
/usr/include/cudnn.h

And change the line:
#include “driver_types.h”

to:
#include <driver_types.h>


Judging from comments above, this seems to have persisted over a year or so.
Is there a reason why the errors are still present in the sample code?

Is there something inherently wrong about the system setup, or is the above an uncorrected error in the sample code?