Thu, 08 Jan 2009 22:06:06 +0100
Remove usage of SUN_LEN thereby increasing portability.
freeradius/freeradius.patch | file | annotate | diff | comparison | revisions | |
freeradius/freeradius.spec | file | annotate | diff | comparison | revisions |
1.1 --- a/freeradius/freeradius.patch Thu Jan 08 22:04:38 2009 +0100 1.2 +++ b/freeradius/freeradius.patch Thu Jan 08 22:06:06 2009 +0100 1.3 @@ -44,3 +44,27 @@ 1.4 - $(MAKE) $(MFLAGS) -C $$mod $(WHAT_TO_MAKE) || exit $$?; \ 1.5 + [ -d $$mod ] || exit 0; $(MAKE) $(MFLAGS) -C $$mod $(WHAT_TO_MAKE) || exit $$?; \ 1.6 done 1.7 +Index: src/main/command.c 1.8 +--- src/main/command.c.orig 2009-01-08 19:39:52.565611820 +0100 1.9 ++++ src/main/command.c 2009-01-08 19:40:18.333372190 +0100 1.10 +@@ -148,7 +148,7 @@ 1.11 + salocal.sun_family = AF_UNIX; 1.12 + memcpy(salocal.sun_path, path, len + 1); /* SUN_LEN does strlen */ 1.13 + 1.14 +- socklen = SUN_LEN(&salocal); 1.15 ++ socklen = sizeof(salocal) - sizeof(salocal.sun_path) + strlen(salocal.sun_path); 1.16 + 1.17 + /* 1.18 + * Check the path. 1.19 +Index: src/main/radmin.c 1.20 +--- src/main/radmin.c.orig 2009-01-08 19:36:15.333428110 +0100 1.21 ++++ src/main/radmin.c 2009-01-08 19:39:15.131776575 +0100 1.22 +@@ -112,7 +112,7 @@ 1.23 + saremote.sun_family = AF_UNIX; 1.24 + memcpy(saremote.sun_path, path, len + 1); /* SUN_LEN does strlen */ 1.25 + 1.26 +- socklen = SUN_LEN(&saremote); 1.27 ++ socklen = sizeof(saremote) - sizeof(saremote.sun_path) + strlen(saremote.sun_path); 1.28 + 1.29 + if (connect(sockfd, (struct sockaddr *)&saremote, socklen) < 0) { 1.30 + fprintf(stderr, "%s: Failed connecting to %s: %s\n",
2.1 --- a/freeradius/freeradius.spec Thu Jan 08 22:04:38 2009 +0100 2.2 +++ b/freeradius/freeradius.spec Thu Jan 08 22:06:06 2009 +0100 2.3 @@ -35,7 +35,7 @@ 2.4 Group: RADIUS 2.5 License: GPL 2.6 Version: 2.1.3 2.7 -Release: 20081206 2.8 +Release: 20090106 2.9 2.10 # package options 2.11 %option with_mysql no