openbsd-ports/x11/fvwm95/patches/patch-modules_FvwmConsole_FvwmConsole_c

31 lines
1.0 KiB
Plaintext
Raw Normal View History

$OpenBSD: patch-modules_FvwmConsole_FvwmConsole_c,v 1.1 2008/07/02 18:16:19 ajacoutot Exp $
--- modules/FvwmConsole/FvwmConsole.c.orig Tue Dec 10 11:41:41 1996
+++ modules/FvwmConsole/FvwmConsole.c Tue Jul 1 11:05:52 2008
@@ -123,7 +123,7 @@ void CloseSocket() {
/*********************************************************/
void server (int *fd) {
struct sockaddr_un sas, csas;
- int len, clen; /* length of sockaddr */
+ socklen_t len, clen; /* length of sockaddr */
char buf[BUFSIZE]; /* command line buffer */
/* make a socket */
@@ -141,7 +141,7 @@ void server (int *fd) {
unlink( S_NAME );
len = sizeof( sas.sun_family) + strlen( sas.sun_path );
- if( bind(s, &sas,len) < 0 ) {
+ if( bind(s, (struct sockaddr *)&sas, len) < 0 ) {
ErrMsg( "bind" );
exit(1);
}
@@ -155,7 +155,7 @@ void server (int *fd) {
/* accept connections */
clen = sizeof(csas);
- if(( ns = accept(s, &csas, &clen)) < 0 ) {
+ if(( ns = accept(s, (struct sockaddr *)&csas, &clen)) < 0 ) {
ErrMsg( "accept");
exit(1);
}