[hackers] [slstatus] ip: add OpenBSD support || Ali H. Fardan

From: <git_AT_suckless.org>
Date: Sun, 29 Apr 2018 13:02:31 +0200 (CEST)

commit 7a9a9b7d76808744796a5ce8f890836296f05763
Author: Ali H. Fardan <raiz_AT_firemail.cc>
AuthorDate: Sun Apr 29 10:55:38 2018 +0300
Commit: Aaron Marcher <me_AT_drkhsh.at>
CommitDate: Sun Apr 29 12:54:28 2018 +0200

    ip: add OpenBSD support
    
    ip.c already works on OpenBSD, it's just missing some headers:

diff --git a/components/ip.c b/components/ip.c
index 686344b..422b448 100644
--- a/components/ip.c
+++ b/components/ip.c
_AT_@ -1,5 +1,9 @@
 /* See LICENSE file for copyright and license details. */
-#if defined(__linux__)
+#if defined(__OpenBSD__)
+#include <sys/types.h>
+#include <sys/socket.h>
+#endif
+
 #include <errno.h>
 #include <ifaddrs.h>
 #include <netdb.h>
_AT_@ -69,4 +73,3 @@ ipv6(const char *iface)
 
         return NULL;
 }
-#endif
Received on Sun Apr 29 2018 - 13:02:31 CEST

This archive was generated by hypermail 2.3.0 : Sun Apr 29 2018 - 13:12:31 CEST