packages feed

network-info 0.2.0.10 → 0.2.1

raw patch · 4 files changed

+30/−13 lines, 4 files

Files

CHANGELOG.md view
@@ -1,4 +1,10 @@-## 0.2.0.10 (2018-03-??)+## 0.2.1 (2022-01-31) +* Support NetBSD (#21)+* Increase upper bound on interfaces to 128 (#24)+* Fix segmentation fault for more than 64 interfaces (#23)++## 0.2.0.10 (2018-03)+  * Fixed a link error that manifested when the C compiler uses C99 by-   default ([#17](https://github.com/jystic/network-info/issues/17)).+   default ([#17](https://github.com/jacobstanley/network-info/issues/17)).
cbits/network-unix.c view
@@ -36,6 +36,10 @@ #   include <netinet/in.h> #endif +#ifdef __NetBSD__+#   include <netinet/in.h>+#endif+ #include "network.h" #include "common.h" @@ -131,6 +135,9 @@          /* lookup or add a new interface with the given name */         n = add_interface(ns, name, max_ns);++        if (n == NULL)+            break;          /* extract the address from this item */         family = addr->sa_family;
network-info.cabal view
@@ -1,5 +1,5 @@ name:           network-info-version:        0.2.0.10+version:        0.2.1 synopsis:       Access the local computer's basic network configuration  description:    This library provides simple read-only access to the@@ -9,20 +9,23 @@                 addresses.                 .                 network-info has been tested and is known to work on-                Ubuntu 10.10, FreeBSD 9.0, Mac OS X 10.6.4 and Windows-                XP/7. It probably works on other flavours of Linux,-                OS X, FreeBSD and Windows as well.+                Ubuntu, FreeBSD, NetBSD, Mac OS and Windows. -homepage:       http://github.com/jystic/network-info+homepage:       http://github.com/jacobstanley/network-info license:        BSD3 license-file:   LICENSE author:         Jacob Stanley maintainer:     Jacob Stanley <jacob@stanley.io> category:       Network build-type:     Simple-cabal-version:  >= 1.6-tested-with:    GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.1+cabal-version:  >= 1.10 +tested-with:+  GHC == 8.8.4,+  GHC == 8.10.7,+  GHC == 9.0.1,+  GHC == 9.2.1+ extra-source-files:   cbits/common.h,   cbits/common.inc,@@ -36,9 +39,10 @@  source-repository head   type:     git-  location: git://github.com/jystic/network-info.git+  location: git://github.com/jacobstanley/network-info.git -Library+library+  default-language: Haskell2010   hs-source-dirs: src   include-dirs: cbits   cc-options: -Wall -std=c99
src/Network/Info.hsc view
@@ -58,8 +58,8 @@ --   the local computer. getNetworkInterfaces :: IO [NetworkInterface] getNetworkInterfaces =-    allocaArray 64 $ \ptr -> do-    count <- c_get_network_interfaces ptr 64+    allocaArray 128 $ \ptr -> do+    count <- c_get_network_interfaces ptr 128     peekArray (fromIntegral count) ptr