Merge branch 'shawnz_bug_fix' into 'master'

Fixed new bug reported during CUDA 13.1 test: 5514725 and 5518076

See merge request cuda-samples/cuda-samples!133
This commit is contained in:
Rob Armstrong 2025-09-18 10:12:12 -07:00
commit 1165d53ddf
2 changed files with 15 additions and 5 deletions

View File

@ -52,12 +52,22 @@
#include <memory.h>
#include <sys/un.h>
#endif
#include <filesystem>
#include <vector>
inline std::string getSocketFolder() {
return std::filesystem::temp_directory_path().string();
}
// Simple filesystem compatibility for GCC 7.x
#if defined(__GNUC__) && __GNUC__ < 8
#include <cstdlib>
#include <string>
inline std::string getSocketFolder() {
const char* tmpdir = std::getenv("TMPDIR");
return tmpdir ? std::string(tmpdir) : "/tmp";
}
#else
#include <filesystem>
inline std::string getSocketFolder() {
return std::filesystem::temp_directory_path().string();
}
#endif
typedef struct sharedMemoryInfo_st {
void *addr;

View File

@ -79,7 +79,7 @@ if(${OpenGL_FOUND})
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/${GLEW_LIB_NAME}.dll
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION >
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>
)
endif()