From: Thomas Schwinge Date: Tue, 5 Jul 2022 06:41:50 +0000 (+0200) Subject: 'include/cuda/cuda.h': For C++, wrap in 'extern "C"' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c35fb158b3b041952cdf010801f948c521b7911;p=thirdparty%2Fgcc.git 'include/cuda/cuda.h': For C++, wrap in 'extern "C"' include/ * cuda/cuda.h: For C++, wrap in 'extern "C"'. (cherry picked from commit bdd1dc1bfbe1492edf3ce5e4288cfbc55be329ab) --- diff --git a/include/ChangeLog.omp b/include/ChangeLog.omp index 6c3b73b44a9f..d97509dfc31d 100644 --- a/include/ChangeLog.omp +++ b/include/ChangeLog.omp @@ -1,3 +1,10 @@ +2022-07-05 Tobias Burnus + + Backport from mainline: + 2022-05-18 Thomas Schwinge + + * cuda/cuda.h: For C++, wrap in 'extern "C"'. + 2022-07-04 Tobias Burnus Backport from mainline: diff --git a/include/cuda/cuda.h b/include/cuda/cuda.h index bbd9fd21b965..1c3271ae77a7 100644 --- a/include/cuda/cuda.h +++ b/include/cuda/cuda.h @@ -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) @@ -203,4 +207,8 @@ CUresult cuStreamQuery (CUstream); CUresult cuStreamSynchronize (CUstream); CUresult cuStreamWaitEvent (CUstream, CUevent, unsigned); +#ifdef __cplusplus +} +#endif + #endif /* GCC_CUDA_H */