diff --git a/openair-cn/NAS/EURECOM-NAS/src/emm/Attach.c b/openair-cn/NAS/EURECOM-NAS/src/emm/Attach.c
index 4161bed1d5b8dcb5a5581dbee335026f25c2c430..6617526459652a7bf522ab12b8921e7a3fb98787 100644
--- a/openair-cn/NAS/EURECOM-NAS/src/emm/Attach.c
+++ b/openair-cn/NAS/EURECOM-NAS/src/emm/Attach.c
@@ -1962,9 +1962,9 @@ static int _emm_attach_identify(void *args)
             auth_vector_t *auth = &emm_ctx->vector;
             const OctetString loc_rand = {AUTH_RAND_SIZE, (uint8_t *)auth->rand};
             const OctetString autn = {AUTH_AUTN_SIZE, (uint8_t *)auth->autn};
-            rc = emm_proc_authentication(emm_ctx->ueid, 0, // TODO: eksi != 0
+            rc = emm_proc_authentication(emm_ctx, emm_ctx->ueid, 0, // TODO: eksi != 0
                                          &loc_rand, &autn,
-                                         emm_attach_security,
+                                         _emm_attach_security,
                                          _emm_attach_release,
                                          _emm_attach_release);
             if (rc != RETURNok) {
diff --git a/openair-cn/NAS/EURECOM-NAS/src/emm/sap/emm_cn.c b/openair-cn/NAS/EURECOM-NAS/src/emm/sap/emm_cn.c
index ffd9e6fb17390f73200b74c7bb37af945450d08c..090a94584c0a6eb8ccd5d05106971f5d82c77e9d 100644
--- a/openair-cn/NAS/EURECOM-NAS/src/emm/sap/emm_cn.c
+++ b/openair-cn/NAS/EURECOM-NAS/src/emm/sap/emm_cn.c
@@ -20,6 +20,8 @@ Description
 
 #include <string.h>
 
+#if defined(EPC_BUILD)
+
 #include "nas_log.h"
 #include "commonDef.h"
 
@@ -132,3 +134,4 @@ int emm_cn_send(const emm_cn_t *msg)
 
     LOG_FUNC_RETURN (rc);
 }
+#endif
diff --git a/openair-cn/NAS/EURECOM-NAS/src/emm/sap/emm_cn.h b/openair-cn/NAS/EURECOM-NAS/src/emm/sap/emm_cn.h
index 143fc77e3413bb5ae664893b00505ad0ac1e7fb2..b65e9890b27dd979a856ee0dfccb4e6b7fd9207f 100644
--- a/openair-cn/NAS/EURECOM-NAS/src/emm/sap/emm_cn.h
+++ b/openair-cn/NAS/EURECOM-NAS/src/emm/sap/emm_cn.h
@@ -23,6 +23,8 @@ Description
 #ifndef _EMM_CN_H_
 #define _EMM_CN_H_
 
+#if defined(EPC_BUILD)
 int emm_cn_send(const emm_cn_t *msg);
+#endif
 
 #endif /* _EMM_CN_H_ */
diff --git a/openair-cn/NAS/EURECOM-NAS/src/emm/sap/emm_cnDef.h b/openair-cn/NAS/EURECOM-NAS/src/emm/sap/emm_cnDef.h
index 577d5c403ad89e6479e67f98eae2a4b70cf60d9a..77041967c690408de49b3a3576b502252e09e45a 100644
--- a/openair-cn/NAS/EURECOM-NAS/src/emm/sap/emm_cnDef.h
+++ b/openair-cn/NAS/EURECOM-NAS/src/emm/sap/emm_cnDef.h
@@ -18,7 +18,9 @@ Description
 
 *****************************************************************************/
 
+#if defined(EPC_BUILD)
 #include "intertask_interface.h"
+#endif
 
 #ifndef __EMM_CNDEF_H__
 #define __EMM_CNDEF_H__
@@ -32,10 +34,10 @@ typedef enum emmcn_primitive_s {
     _EMMCN_END
 } emm_cn_primitive_t;
 
+#if defined(EPC_BUILD)
 typedef nas_auth_param_rsp_t  emm_cn_auth_res_t;
 typedef nas_auth_param_fail_t emm_cn_auth_fail_t;
 
-#if defined(EPC_BUILD)
 typedef struct emm_mme_ul_s {
     emm_cn_primitive_t primitive;
     union {