Commit 2fdfe079 authored by Jim Blandy's avatar Jim Blandy
Browse files

* emacsserver.c (main): When we're passing a `struct sockaddr_un'

	to bind or accept, cast the pointer, to avoid warnings on systems
	which declare prototypes for this.
parent 63826237
...@@ -108,7 +108,7 @@ main () ...@@ -108,7 +108,7 @@ main ()
unlink (server.sun_path); unlink (server.sun_path);
#endif #endif
if (bind (s, &server, strlen (server.sun_path) + 2) < 0) if (bind (s, (struct sockaddr *) &server, strlen (server.sun_path) + 2) < 0)
{ {
perror ("bind"); perror ("bind");
exit (1); exit (1);
...@@ -135,7 +135,7 @@ main () ...@@ -135,7 +135,7 @@ main ()
{ {
fromlen = sizeof (fromunix); fromlen = sizeof (fromunix);
fromunix.sun_family = AF_UNIX; fromunix.sun_family = AF_UNIX;
infd = accept (s, &fromunix, &fromlen); /* open socket fd */ infd = accept (s, (struct sockaddr *) &fromunix, &fromlen); /* open socket fd */
if (infd < 0) if (infd < 0)
{ {
if (errno == EMFILE || errno == ENFILE) if (errno == EMFILE || errno == ENFILE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment