]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
'include/cuda/cuda.h': For C++, wrap in 'extern "C"'
authorThomas Schwinge <thomas@codesourcery.com>
Fri, 29 Apr 2022 08:33:15 +0000 (10:33 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Wed, 18 May 2022 10:06:20 +0000 (12:06 +0200)
include/
* cuda/cuda.h: For C++, wrap in 'extern "C"'.

include/cuda/cuda.h

index 5c813ad2cf814be6823c0e854b47c10f0b4a0812..d7105fb331e8bf4e2a81a4dab4d9635142cff1e1 100644 (file)
@@ -32,6 +32,10 @@ the proprietary CUDA toolkit.  */
 
 #define CUDA_VERSION 8000
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef void *CUcontext;
 typedef int CUdevice;
 #if defined(__LP64__) || defined(_WIN64)
@@ -191,4 +195,8 @@ CUresult cuStreamQuery (CUstream);
 CUresult cuStreamSynchronize (CUstream);
 CUresult cuStreamWaitEvent (CUstream, CUevent, unsigned);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* GCC_CUDA_H */