# HG changeset patch # User Michael Schloh von Bennewitz # Date 1231448766 -3600 # Node ID e12fbbfbe80e32351b1fe20b21501e81da75c4ef # Parent 120a0b206db91b250e20a57cffce5e101cc48d5e Remove usage of SUN_LEN thereby increasing portability. diff -r 120a0b206db9 -r e12fbbfbe80e freeradius/freeradius.patch --- a/freeradius/freeradius.patch Thu Jan 08 22:04:38 2009 +0100 +++ b/freeradius/freeradius.patch Thu Jan 08 22:06:06 2009 +0100 @@ -44,3 +44,27 @@ - $(MAKE) $(MFLAGS) -C $$mod $(WHAT_TO_MAKE) || exit $$?; \ + [ -d $$mod ] || exit 0; $(MAKE) $(MFLAGS) -C $$mod $(WHAT_TO_MAKE) || exit $$?; \ done +Index: src/main/command.c +--- src/main/command.c.orig 2009-01-08 19:39:52.565611820 +0100 ++++ src/main/command.c 2009-01-08 19:40:18.333372190 +0100 +@@ -148,7 +148,7 @@ + salocal.sun_family = AF_UNIX; + memcpy(salocal.sun_path, path, len + 1); /* SUN_LEN does strlen */ + +- socklen = SUN_LEN(&salocal); ++ socklen = sizeof(salocal) - sizeof(salocal.sun_path) + strlen(salocal.sun_path); + + /* + * Check the path. +Index: src/main/radmin.c +--- src/main/radmin.c.orig 2009-01-08 19:36:15.333428110 +0100 ++++ src/main/radmin.c 2009-01-08 19:39:15.131776575 +0100 +@@ -112,7 +112,7 @@ + saremote.sun_family = AF_UNIX; + memcpy(saremote.sun_path, path, len + 1); /* SUN_LEN does strlen */ + +- socklen = SUN_LEN(&saremote); ++ socklen = sizeof(saremote) - sizeof(saremote.sun_path) + strlen(saremote.sun_path); + + if (connect(sockfd, (struct sockaddr *)&saremote, socklen) < 0) { + fprintf(stderr, "%s: Failed connecting to %s: %s\n", diff -r 120a0b206db9 -r e12fbbfbe80e freeradius/freeradius.spec --- a/freeradius/freeradius.spec Thu Jan 08 22:04:38 2009 +0100 +++ b/freeradius/freeradius.spec Thu Jan 08 22:06:06 2009 +0100 @@ -35,7 +35,7 @@ Group: RADIUS License: GPL Version: 2.1.3 -Release: 20081206 +Release: 20090106 # package options %option with_mysql no