aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2023-03-14 22:16:57 +0100
committerLuca Deri <deri@ntop.org>2023-03-14 22:16:57 +0100
commit9f46d41eca9c479b407b0d4f7336dc5805b0b78a (patch)
tree98132fd39ee99715a04b7399e242d4910066b561
parent9eff075419cbb0fe2758d7f8505359e3130e6df6 (diff)
FreeBSD compilation fix
(C) update
-rw-r--r--src/lib/ndpi_main.c2
-rw-r--r--src/lib/ndpi_memory.c35
2 files changed, 31 insertions, 6 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 4beb47e9e..f67844103 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -1,7 +1,7 @@
/*
* ndpi_main.c
*
- * Copyright (C) 2011-22 - ntop.org
+ * Copyright (C) 2011-23 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
diff --git a/src/lib/ndpi_memory.c b/src/lib/ndpi_memory.c
index 111fd1ff4..325806ddc 100644
--- a/src/lib/ndpi_memory.c
+++ b/src/lib/ndpi_memory.c
@@ -1,9 +1,34 @@
-#include <stddef.h>
+/*
+ * ndpi_memory.c
+ *
+ * Copyright (C) 2011-23 - ntop.org
+ *
+ * This file is part of nDPI, an open source deep packet inspection
+ * library based on the OpenDPI and PACE technology by ipoque GmbH
+ *
+ * nDPI is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * nDPI is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with nDPI. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
#include <stdlib.h>
-#include <string.h>
-#ifdef WIN32
-#include "ndpi_win32.h" /* For __sync_fetch_and_add */
-#endif
+#include <errno.h>
+#include <sys/types.h>
+
+#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_UNKNOWN
+
+#include "ndpi_config.h"
+#include "ndpi_api.h"
/* ****************************************** */