logfile: resolve name clash on SunOS

pull/2219/head
Victor Julien 10 years ago
parent b81ea0d7db
commit 8600872e02

@ -46,19 +46,19 @@ const char * redis_publish_cmd = "PUBLISH";
static FILE * static FILE *
SCLogOpenUnixSocketFp(const char *path, int sock_type, int log_err) SCLogOpenUnixSocketFp(const char *path, int sock_type, int log_err)
{ {
struct sockaddr_un sun; struct sockaddr_un saun;
int s = -1; int s = -1;
FILE * ret = NULL; FILE * ret = NULL;
memset(&sun, 0x00, sizeof(sun)); memset(&saun, 0x00, sizeof(saun));
s = socket(PF_UNIX, sock_type, 0); s = socket(PF_UNIX, sock_type, 0);
if (s < 0) goto err; if (s < 0) goto err;
sun.sun_family = AF_UNIX; saun.sun_family = AF_UNIX;
strlcpy(sun.sun_path, path, sizeof(sun.sun_path)); strlcpy(saun.sun_path, path, sizeof(saun.sun_path));
if (connect(s, (const struct sockaddr *)&sun, sizeof(sun)) < 0) if (connect(s, (const struct sockaddr *)&saun, sizeof(saun)) < 0)
goto err; goto err;
ret = fdopen(s, "w"); ret = fdopen(s, "w");

Loading…
Cancel
Save