diff -Nru orig/lfa/src/fastmat.c patched/lfa/src/fastmat.c
--- orig/lfa/src/fastmat.c	2022-11-01 11:56:51.000000000 -0700
+++ patched/lfa/src/fastmat.c	2022-12-01 02:57:44.536428600 -0800
@@ -19,7 +19,7 @@
     double zero = 0.0;
     char tr = 'N';
     int one = 1;
-    F77_CALL(dgemv)(&tr,dimA,dimA+1,&alpha,A,dimA,v,&one,&zero,ret,&one);
+    F77_CALL(dgemv)(&tr,dimA,dimA+1,&alpha,A,dimA,v,&one,&zero,ret,&one FCONE);
 
     UNPROTECT(3);
 
@@ -45,7 +45,7 @@
     double zero = 0.0;
     char tr = 'T';
     int one = 1;
-    F77_CALL(dgemv)(&tr,dimA,dimA+1,&alpha,A,dimA,v,&one,&zero,ret,&one);
+    F77_CALL(dgemv)(&tr,dimA,dimA+1,&alpha,A,dimA,v,&one,&zero,ret,&one FCONE);
 
     UNPROTECT(3);
 
diff -Nru orig/lfa/src/lfa.h patched/lfa/src/lfa.h
--- orig/lfa/src/lfa.h	2022-11-01 11:56:51.000000000 -0700
+++ patched/lfa/src/lfa.h	2022-12-01 02:56:37.972155200 -0800
@@ -1,6 +1,16 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <math.h>
+
+#ifndef  USE_FC_LEN_T
+# define USE_FC_LEN_T
+#endif
+#include <Rconfig.h>
+#include <R_ext/BLAS.h>
+#ifndef FCONE
+# define FCONE
+#endif
+
 #include <R.h>
 #include <Rinternals.h>
 #include <Rmath.h>
diff -Nru orig/lfa/src/lreg.c patched/lfa/src/lreg.c
--- orig/lfa/src/lreg.c	2022-11-01 11:56:51.000000000 -0700
+++ patched/lfa/src/lreg.c	2022-12-01 02:59:58.565696300 -0800
@@ -46,7 +46,7 @@
     while(iter <= maxiter){
         ///////////////////////////////////////////////////////////////////////
         //p <- as.vector(1/(1 + exp(-X %*% b)))
-        F77_CALL(dgemv)(&tr,dimX,dimX+1,&alpha,X,dimX,b,&ione,&zero,p,&ione);
+        F77_CALL(dgemv)(&tr,dimX,dimX+1,&alpha,X,dimX,b,&ione,&zero,p,&ione FCONE);
         for(i = 0; i < dimX[0]; i++) 
             p[i] = 1/(1+exp(p[i]));
         
@@ -117,7 +117,7 @@
             }
         }
 
-        F77_CALL(dgemv)(&tr,dimX+1,dimX+1,&one,w,dimX+1,f,&ione,&one,b,&ione);
+        F77_CALL(dgemv)(&tr,dimX+1,dimX+1,&one,w,dimX+1,f,&ione,&one,b,&ione FCONE);
         
         
         ///////////////////////////////////////////////////////////////////////
