]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/util/server_ipc.c
Merge master
[netatalk.git] / libatalk / util / server_ipc.c
index 2a3e37be4cac8977c5644d85233a2bf8468c66ce..d40e3a49ea4cb07bf1b7984fc418cb5ec11521ee 100644 (file)
@@ -9,9 +9,7 @@
 #endif 
 
 #include <sys/types.h>
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -71,8 +69,8 @@ static int ipc_kill_token(struct ipc_header *ipc, server_child *children)
 /* ----------------- */
 static int ipc_get_session(struct ipc_header *ipc, server_child *children)
 {
-    u_int32_t boottime;
-    u_int32_t idlen;
+    uint32_t boottime;
+    uint32_t idlen;
     char     *clientid, *p;
 
     
@@ -129,7 +127,7 @@ int ipc_server_uds(const char *name)
     EC_ZERO_LOG( setnonblock(fd, 1) );
     unlink(name);
     address.sun_family = AF_UNIX;
-    address_length = sizeof(address.sun_family) + sprintf(address.sun_path, name);
+    address_length = sizeof(address.sun_family) + sprintf(address.sun_path, "%s", name);
     EC_ZERO_LOG( bind(fd, (struct sockaddr *)&address, address_length) );
     EC_ZERO_LOG( listen(fd, 1024) );
 
@@ -160,7 +158,7 @@ int ipc_client_uds(const char *name)
 
     EC_NEG1_LOG( fd = socket(PF_UNIX, SOCK_STREAM, 0) );
     address.sun_family = AF_UNIX;
-    address_length = sizeof(address.sun_family) + sprintf(address.sun_path, name);
+    address_length = sizeof(address.sun_family) + sprintf(address.sun_path, "%s", name);
 
     EC_ZERO_LOG( connect(fd, (struct sockaddr *)&address, address_length) ); /* 1 */
     LOG(log_debug, logtype_afpd, "ipc_client_uds: connected to master");
@@ -349,4 +347,3 @@ int ipc_child_write(int fd, uint16_t command, int len, void *msg)
 
    return 0;
 }
-