fixed laerror, compilable with MKL without cblas.h header

This commit is contained in:
jiri committed 2026-11-25 11:33:02 +01:00
1 parent 2eb8e35b92
commit d3a106019f
1 file changed
+6 -1
+6 -1
View File
@@ -61,7 +61,8 @@ int traceback(int flags)
char pid_buf[256]; char pid_buf[256];
sprintf(pid_buf, "%d", getpid()); sprintf(pid_buf, "%d", getpid());
char name_buf[512]; char name_buf[512];
name_buf[readlink("/proc/self/exe", name_buf, 511)]=0; ssize_t r=readlink("/proc/self/exe", name_buf, 511);
name_buf[r>0?r:0]=0;
prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0); prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0);
int child_pid = fork(); int child_pid = fork();
if (!child_pid) { if (!child_pid) {
@@ -174,7 +175,11 @@ extern "C" void ATL_xerbla(int p, char *rout, char *form, ...){
#ifndef NONCBLAS #ifndef NONCBLAS
extern "C" { extern "C" {
#ifdef HAS_MKL
#include "mkl_cblas.h"
#else
#include "cblas.h" #include "cblas.h"
#endif
} }
#include <stdarg.h> #include <stdarg.h>
#ifndef AVOID_DUPLICATE_CBLAS_XERBLA #ifndef AVOID_DUPLICATE_CBLAS_XERBLA