Skip to content

Commit a8d1484

Browse files
committed
renamed variable from sun to saun to fix SmarOS compilation
1 parent 8d28f7f commit a8d1484

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

ngx_rtmp_auto_push_module.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ ngx_rtmp_auto_push_init_process(ngx_cycle_t *cycle)
102102
#if (NGX_HAVE_UNIX_DOMAIN)
103103
ngx_rtmp_auto_push_conf_t *apcf;
104104
ngx_listening_t *ls, *lss;
105-
struct sockaddr_un *sun;
105+
struct sockaddr_un *saun;
106106
int reuseaddr;
107107
ngx_socket_t s;
108108
size_t n;
@@ -157,26 +157,26 @@ ngx_rtmp_auto_push_init_process(ngx_cycle_t *cycle)
157157
ls->addr_ntop = 0;
158158

159159
ls->socklen = sizeof(struct sockaddr_un);
160-
sun = ngx_pcalloc(cycle->pool, ls->socklen);
161-
ls->sockaddr = (struct sockaddr *) sun;
160+
saun = ngx_pcalloc(cycle->pool, ls->socklen);
161+
ls->sockaddr = (struct sockaddr *) saun;
162162
if (ls->sockaddr == NULL) {
163163
return NGX_ERROR;
164164
}
165-
sun->sun_family = AF_UNIX;
166-
*ngx_snprintf((u_char *) sun->sun_path, sizeof(sun->sun_path),
165+
saun->sun_family = AF_UNIX;
166+
*ngx_snprintf((u_char *) saun->sun_path, sizeof(saun->sun_path),
167167
"%V/" NGX_RTMP_AUTO_PUSH_SOCKNAME ".%i",
168168
&apcf->socket_dir, ngx_process_slot)
169169
= 0;
170170

171171
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, cycle->log, 0,
172172
"auto_push: create socket '%s'",
173-
sun->sun_path);
173+
saun->sun_path);
174174

175-
if (ngx_file_info(sun->sun_path, &fi) != ENOENT) {
175+
if (ngx_file_info(saun->sun_path, &fi) != ENOENT) {
176176
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, cycle->log, 0,
177177
"auto_push: delete existing socket '%s'",
178-
sun->sun_path);
179-
ngx_delete_file(sun->sun_path);
178+
saun->sun_path);
179+
ngx_delete_file(saun->sun_path);
180180
}
181181

182182
ngx_str_set(&ls->addr_text, "worker_socket");
@@ -205,7 +205,7 @@ ngx_rtmp_auto_push_init_process(ngx_cycle_t *cycle)
205205
}
206206
}
207207

208-
if (bind(s, (struct sockaddr *) sun, sizeof(*sun)) == -1) {
208+
if (bind(s, (struct sockaddr *) saun, sizeof(*saun)) == -1) {
209209
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_socket_errno,
210210
ngx_nonblocking_n " worker_socket bind failed");
211211
goto sock_error;
@@ -228,7 +228,7 @@ ngx_rtmp_auto_push_init_process(ngx_cycle_t *cycle)
228228
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_socket_errno,
229229
ngx_close_socket_n " worker_socket failed");
230230
}
231-
ngx_delete_file(sun->sun_path);
231+
ngx_delete_file(saun->sun_path);
232232

233233
return NGX_ERROR;
234234

0 commit comments

Comments
 (0)