tsocket: try to fix the build on solaris FIONREAD was missing
[ira/wip.git] / lib / tsocket / tsocket_bsd.c
index f673aa65e7c0d274c43b5ab773fdc2b2dcda1a7d..8254f5d9d3ec0018235ef869e43242c8b08dbf2b 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "replace.h"
+#include "system/filesys.h"
 #include "system/network.h"
 #include "tsocket.h"
 #include "tsocket_internal.h"
@@ -301,21 +302,21 @@ int _tsocket_address_unix_from_path(TALLOC_CTX *mem_ctx,
                                    struct tsocket_address **_addr,
                                    const char *location)
 {
-       struct sockaddr_un sun;
-       void *p = &sun;
+       struct sockaddr_un un;
+       void *p = &un;
        int ret;
 
        if (!path) {
                path = "";
        }
 
-       ZERO_STRUCT(sun);
-       sun.sun_family = AF_UNIX;
-       strncpy(sun.sun_path, path, sizeof(sun.sun_path));
+       ZERO_STRUCT(un);
+       un.sun_family = AF_UNIX;
+       strncpy(un.sun_path, path, sizeof(un.sun_path));
 
        ret = _tsocket_address_bsd_from_sockaddr(mem_ctx,
                                                 (struct sockaddr *)p,
-                                                sizeof(sun),
+                                                sizeof(un),
                                                 _addr,
                                                 location);