]> git.meshlink.io Git - meshlink/commitdiff
Removed references to HAVE_STRUCT_SOCKADDR_STORAGE.
authorAaron Krebs <aaron.krebs@everbase.net>
Tue, 12 Aug 2014 09:43:35 +0000 (11:43 +0200)
committerAaron Krebs <aaron.krebs@everbase.net>
Tue, 12 Aug 2014 09:48:03 +0000 (11:48 +0200)
Enforced sockaddr_storage support in configure.ac

configure.ac
src/meshlink.c
src/meshlink.h
src/sockaddr.h

index 2f1caa68fedc14e811c3fa324190749085253ade..6c6543cba57f148426253c5c5c976f2dc35308ea 100644 (file)
@@ -99,6 +99,10 @@ AC_CHECK_TYPES([socklen_t, struct addrinfo, struct sockaddr_in6], , ,
   [#include "src/have.h"]
 )
 
+AC_CHECK_TYPES([struct sockaddr_storage], ,AC_MSG_ERROR([System must support struct sockaddr_storage.]),
+  [#include "src/have.h"]
+)
+
 dnl Checks for library functions.
 AC_TYPE_SIGNAL
 AC_CHECK_FUNCS([asprintf fchmod fork get_current_dir_name gettimeofday random select strdup strerror time usleep],
index 0799c4d7bed8b17d659e8b508236dddbc88edd9f..e84aafcac9e3a7d3197e278eb186c510b0c5a232 100644 (file)
@@ -1880,9 +1880,7 @@ meshlink_edge_t **meshlink_get_all_edges_state(meshlink_handle_t *mesh, meshlink
                        }
                        copy->from = (meshlink_node_t*)e->from;
                        copy->to = (meshlink_node_t*)e->to;
-#ifdef HAVE_STRUCT_SOCKADDR_STORAGE
                        copy->address = e->address.storage;
-#endif
                        copy->options = e->options;
                        copy->weight = e->weight;
                        *p++ = copy;
index 4b240429b59d9618f897ac11eef2ad64e4bd93a5..6f104abe5fcb5cc29bedb9f7e048dd465e211e37 100644 (file)
@@ -110,9 +110,7 @@ struct meshlink_edge {
                                         //   owned by meshlink and should not be
                                         //   deallocated. Node contents may be
                                         //   changed by meshlink.
-#ifdef HAVE_STRUCT_SOCKADDR_STORAGE
        struct sockaddr_storage address;///< The address information associated
-#endif
                                        //   with this edge.
        uint32_t options;               ///< Edge options. @TODO what are edge options?
        int weight;                     ///< Weight assigned to this edge.
index 255dc83018f04a744062a714ac2e6485ab896ec1..775f81f6a36409dfcbee42a7183582885f4339be 100644 (file)
@@ -22,9 +22,7 @@ typedef union sockaddr_t {
        struct sockaddr_in in;
        struct sockaddr_in6 in6;
        struct sockaddr_unknown unknown;
-#ifdef HAVE_STRUCT_SOCKADDR_STORAGE
        struct sockaddr_storage storage;
-#endif
 } sockaddr_t;
 
 #endif // SOCKADDR_H