mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-07-24 10:26:10 +00:00
Fix unused variable on linux because of portage work.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2268 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
589f889fbe
commit
74c0a68ee1
@ -795,7 +795,6 @@ extern void coroipcs_ipc_init (
|
||||
int server_fd;
|
||||
struct sockaddr_un un_addr;
|
||||
int res;
|
||||
struct stat stat_out;
|
||||
|
||||
api = init_state;
|
||||
|
||||
@ -827,13 +826,16 @@ extern void coroipcs_ipc_init (
|
||||
#if defined(COROSYNC_LINUX)
|
||||
sprintf (un_addr.sun_path + 1, "%s", api->socket_name);
|
||||
#else
|
||||
res = stat (SOCKETDIR, &stat_out);
|
||||
if (res == -1 || (res == 0 && !S_ISDIR(stat_out.st_mode))) {
|
||||
api->log_printf ("Required directory not present %s\n", SOCKETDIR);
|
||||
api->fatal_error ("Please create required directory.");
|
||||
{
|
||||
struct stat stat_out;
|
||||
res = stat (SOCKETDIR, &stat_out);
|
||||
if (res == -1 || (res == 0 && !S_ISDIR(stat_out.st_mode))) {
|
||||
api->log_printf ("Required directory not present %s\n", SOCKETDIR);
|
||||
api->fatal_error ("Please create required directory.");
|
||||
}
|
||||
sprintf (un_addr.sun_path, "%s/%s", SOCKETDIR, api->socket_name);
|
||||
unlink (un_addr.sun_path);
|
||||
}
|
||||
sprintf (un_addr.sun_path, "%s/%s", SOCKETDIR, api->socket_name);
|
||||
unlink (un_addr.sun_path);
|
||||
#endif
|
||||
|
||||
res = bind (server_fd, (struct sockaddr *)&un_addr, COROSYNC_SUN_LEN(&un_addr));
|
||||
|
Loading…
Reference in New Issue
Block a user