Permalink
Browse files

remember: do not use the word 'sun' as variable on solaris...

  • Loading branch information...
1 parent 5707a70 commit ae6780a487dba2a74b6a6fedcde0303b0a6a098a roberto@solarisexpress committed May 26, 2011
Showing with 7 additions and 7 deletions.
  1. +7 −7 notify.c
View
@@ -40,7 +40,7 @@ void uwsgi_systemd_notify_ready(void) {
void uwsgi_systemd_init(char *systemd_socket) {
- struct sockaddr_un *sun;
+ struct sockaddr_un *sd_sun;
struct msghdr *msghdr;
uwsgi.notification_fd = socket(AF_UNIX, SOCK_DGRAM, 0);
@@ -49,19 +49,19 @@ void uwsgi_systemd_init(char *systemd_socket) {
return;
}
- sun = uwsgi_malloc(sizeof(struct sockaddr_un));
- memset(sun, 0, sizeof(struct sockaddr_un));
- sun->sun_family = AF_UNIX;
- strncpy(sun->sun_path, systemd_socket, sizeof(sun->sun_path));
- if (sun->sun_path[0] == '@') sun->sun_path[0] = 0;
+ sd_sun = uwsgi_malloc(sizeof(struct sockaddr_un));
+ memset(sd_sun, 0, sizeof(struct sockaddr_un));
+ sd_sun->sun_family = AF_UNIX;
+ strncpy(sd_sun->sun_path, systemd_socket, sizeof(sd_sun->sun_path));
+ if (sd_sun->sun_path[0] == '@') sd_sun->sun_path[0] = 0;
msghdr = uwsgi_malloc(sizeof(struct msghdr));
memset(msghdr, 0, sizeof(struct msghdr));
msghdr->msg_iov = uwsgi_malloc(sizeof(struct iovec)*3);
memset(msghdr->msg_iov, 0, sizeof(struct iovec)*3);
- msghdr->msg_name = sun;
+ msghdr->msg_name = sd_sun;
msghdr->msg_namelen = sizeof(struct sockaddr_un);
uwsgi.notification_object = msghdr;

0 comments on commit ae6780a

Please sign in to comment.