mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
Fix compile error on Linux
This commit is contained in:
parent
7e206d5930
commit
5ac6bd8834
@ -714,9 +714,9 @@ int app_server_start(const struct cli_parsed *parsed, void *context)
|
|||||||
#endif
|
#endif
|
||||||
if ((tmp = malloc(PATH_MAX)) == NULL)
|
if ((tmp = malloc(PATH_MAX)) == NULL)
|
||||||
RETURN(WHY("Out of memory"));
|
RETURN(WHY("Out of memory"));
|
||||||
if (get_self_executable_path(tmp, PATH_MAX) == -1)
|
if (get_self_executable_path(tmp, PATH_MAX) == -1)
|
||||||
RETURN(WHY("unable to determine own executable name"));
|
RETURN(WHY("unable to determine own executable name"));
|
||||||
execpath = tmp;
|
execpath = tmp;
|
||||||
}
|
}
|
||||||
/* Create the instance directory if it does not yet exist */
|
/* Create the instance directory if it does not yet exist */
|
||||||
if (create_serval_instance_dir() == -1)
|
if (create_serval_instance_dir() == -1)
|
||||||
|
@ -88,7 +88,7 @@ int overlay_mdp_setup_sockets()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (mdp_named.poll.fd<=0) {
|
if (mdp_named.poll.fd<=0) {
|
||||||
if (!form_serval_instance_path(&name.sun_path[0], PATH_MAX, "mdp.socket"))
|
if (!form_serval_instance_path(&name.sun_path[0], sizeof name.sun_path, "mdp.socket"))
|
||||||
return WHY("Cannot construct name of unix domain socket.");
|
return WHY("Cannot construct name of unix domain socket.");
|
||||||
unlink(&name.sun_path[0]);
|
unlink(&name.sun_path[0]);
|
||||||
len = 0+strlen(&name.sun_path[0]) + sizeof(name.sun_family)+1;
|
len = 0+strlen(&name.sun_path[0]) + sizeof(name.sun_family)+1;
|
||||||
|
Loading…
Reference in New Issue
Block a user