]> git.meshlink.io Git - meshlink/commitdiff
Include "system.h" in the UTCP sources.
authorGuus Sliepen <guus@meshlink.io>
Wed, 3 Jun 2020 19:23:33 +0000 (21:23 +0200)
committerGuus Sliepen <guus@meshlink.io>
Wed, 3 Jun 2020 19:26:54 +0000 (21:26 +0200)
The UTCP sources were not using the system.h header file like the rest
of the code, resulting in issues with some compilers.

src/utcp-test.c
src/utcp.c

index 992e6f0f9b1952673705a5015601e866ceb12bda..d1fb606fe31a822da7495d1222f505f9f1a99a19 100644 (file)
@@ -1,16 +1,25 @@
-#define _GNU_SOURCE
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
+/*
+    utcp-test.c -- Test application for UTCP
+    Copyright (C) 2014-2020 Guus Sliepen <guus@tinc-vpn.org>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program 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 General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+#include "system.h"
 #include <poll.h>
 #include <poll.h>
-
+#include <time.h>
 
 #include "utcp.h"
 
 
 #include "utcp.h"
 
index ec74923dd128a85c4b730fefa015127e40a40c8a..1c0890c6743b4a71b4da052bdb7ee800958b71ad 100644 (file)
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#define _GNU_SOURCE
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <unistd.h>
+#include "system.h"
 #include <time.h>
 
 #include "utcp_priv.h"
 #include <time.h>
 
 #include "utcp_priv.h"