From 426ded6e31a449e0da30c0656df6c69166b72c8a Mon Sep 17 00:00:00 2001
From: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Date: Wed, 30 Mar 2022 16:42:12 +0200
Subject: [PATCH] fix(build): fix warnings on circular dependency

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
---
 openair2/PHY_INTERFACE/queue_t.h     | 5 ++++-
 openair2/RRC/LTE/MESSAGES/asn1_msg.h | 5 +++++
 openair2/RRC/NR/MESSAGES/asn1_msg.h  | 4 +++-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/openair2/PHY_INTERFACE/queue_t.h b/openair2/PHY_INTERFACE/queue_t.h
index 4678e310301..5c644a320cf 100644
--- a/openair2/PHY_INTERFACE/queue_t.h
+++ b/openair2/PHY_INTERFACE/queue_t.h
@@ -24,7 +24,8 @@
     }
 */
 
-#pragma once
+#ifndef __OPENAIR2_PHY_INTERFACE_QUEUE_T__H__
+#define __OPENAIR2_PHY_INTERFACE_QUEUE_T__H__
 
 #include <stdbool.h>
 #include <stdint.h>
@@ -62,3 +63,5 @@ typedef bool queue_matcher_t(void *wanted, void *candidate);
    Look only at the last `max_depth` items on the queue, at most.
    Returns the candidate item, or NULL if none matches */
 void *unqueue_matching(queue_t *q, size_t max_depth, queue_matcher_t *matcher, void *wanted);
+
+#endif  /* __OPENAIR2_PHY_INTERFACE_QUEUE_T__H__ */
diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.h b/openair2/RRC/LTE/MESSAGES/asn1_msg.h
index d1d1d3febe1..8373bb53f33 100644
--- a/openair2/RRC/LTE/MESSAGES/asn1_msg.h
+++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.h
@@ -28,6 +28,9 @@
 * \email: raymond.knopp@eurecom.fr and  navid.nikaein@eurecom.fr
 */
 
+#ifndef __RRC_LTE_MESSAGES_ASN1_MSG__H__
+#define __RRC_LTE_MESSAGES_ASN1_MSG__H__
+
 #include <stdio.h>
 #include <sys/types.h>
 #include <stdlib.h> /* for atoi(3) */
@@ -405,3 +408,5 @@ uint8_t do_SecurityModeCommand(
   const uint8_t Transaction_id,
   const uint8_t cipheringAlgorithm,
   const uint8_t integrityProtAlgorithm);
+
+#endif  /* __RRC_LTE_MESSAGES_ASN1_MSG__H__ */
diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.h b/openair2/RRC/NR/MESSAGES/asn1_msg.h
index befe83b1417..52efba6f45d 100644
--- a/openair2/RRC/NR/MESSAGES/asn1_msg.h
+++ b/openair2/RRC/NR/MESSAGES/asn1_msg.h
@@ -28,7 +28,8 @@
 * \email: raymond.knopp@eurecom.fr and  navid.nikaein@eurecom.fr, kroempa@gmail.com
 */
 
-#pragma once
+#ifndef __RRC_NR_MESSAGES_ASN1_MSG__H__
+#define __RRC_NR_MESSAGES_ASN1_MSG__H__
 
 #include <stdio.h>
 #include <sys/types.h>
@@ -207,3 +208,4 @@ do_RRCReestablishmentComplete(
     uint8_t *buffer, size_t buffer_size,
     int64_t rrc_TransactionIdentifier);
 
+#endif  /* __RRC_NR_MESSAGES_ASN1_MSG__H__ */
-- 
GitLab