pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcap/+/39285?usp=email )
Change subject: Cleanup and reorder includes in header files ......................................................................
Cleanup and reorder includes in header files
Put all includes in same order of dependencies.
Include stdint.h instead of inttypes.h since that's the file actually containing the standard int types.
Change-Id: I0467d3c3a2687a7990c0db7371d0c89f97e8400a --- M include/osmo-pcap/osmo_pcap_client.h M include/osmo-pcap/osmo_pcap_server.h M include/osmo-pcap/osmo_tls.h M include/osmo-pcap/wireformat.h M src/osmo_server_network.c 5 files changed, 15 insertions(+), 15 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved
diff --git a/include/osmo-pcap/osmo_pcap_client.h b/include/osmo-pcap/osmo_pcap_client.h index 09a4674..442244e 100644 --- a/include/osmo-pcap/osmo_pcap_client.h +++ b/include/osmo-pcap/osmo_pcap_client.h @@ -21,8 +21,6 @@ */ #pragma once
-#include "osmo_tls.h" - #include <inttypes.h> #include <pcap.h>
@@ -32,6 +30,8 @@ #include <osmocom/core/rate_ctr.h> #include <osmocom/core/write_queue.h>
+#include <osmo-pcap/osmo_tls.h> + #define WQUEUE_MAXLEN_DEFAULT 1000
enum pcap_client_ctr { diff --git a/include/osmo-pcap/osmo_pcap_server.h b/include/osmo-pcap/osmo_pcap_server.h index 988ac96..da39d99 100644 --- a/include/osmo-pcap/osmo_pcap_server.h +++ b/include/osmo-pcap/osmo_pcap_server.h @@ -21,21 +21,20 @@ */ #pragma once
-#include "wireformat.h" -#include "osmo_tls.h" - -#include <osmocom/core/select.h> -#include <osmocom/core/linuxlist.h> -#include <osmocom/core/write_queue.h> - +#include <stdbool.h> +#include <time.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h>
#include <pcap.h>
-#include <stdbool.h> -#include <time.h> +#include <osmocom/core/select.h> +#include <osmocom/core/linuxlist.h> +#include <osmocom/core/write_queue.h> + +#include <osmo-pcap/wireformat.h> +#include <osmo-pcap/osmo_tls.h>
struct rate_ctr_group; struct rate_ctr_group_desc; diff --git a/include/osmo-pcap/osmo_tls.h b/include/osmo-pcap/osmo_tls.h index 1b15168..716604e 100644 --- a/include/osmo-pcap/osmo_tls.h +++ b/include/osmo-pcap/osmo_tls.h @@ -20,12 +20,12 @@ */ #pragma once
-#include <gnutls/gnutls.h> -#include <gnutls/abstract.h> - #include <stdbool.h> #include <stdint.h>
+#include <gnutls/gnutls.h> +#include <gnutls/abstract.h> + struct osmo_fd; struct osmo_wqueue; struct osmo_pcap_client_conn; diff --git a/include/osmo-pcap/wireformat.h b/include/osmo-pcap/wireformat.h index 3838830..40b5b0e 100644 --- a/include/osmo-pcap/wireformat.h +++ b/include/osmo-pcap/wireformat.h @@ -21,7 +21,7 @@ */ #pragma once
-#include <inttypes.h> +#include <stdint.h> #include <pcap.h>
enum OsmoPcapDataType { diff --git a/src/osmo_server_network.c b/src/osmo_server_network.c index 64d772a..c2b0e34 100644 --- a/src/osmo_server_network.c +++ b/src/osmo_server_network.c @@ -41,6 +41,7 @@ #include <unistd.h> #include <limits.h> #include <stdlib.h> +#include <inttypes.h> #include <libgen.h>
static void pcap_zmq_send(void *publ, const void *data, size_t len, int flags)