Browse code

- minor x86_64 fixes

Andrei Pelinescu-Onciul authored on 22/10/2004 17:17:55
Showing 3 changed files
... ...
@@ -224,6 +224,7 @@ sunpkg:
224 224
 	rm -rf tmp/ser_sun_pkg
225 225
 
226 226
 
227
+.PHONY: install
227 228
 install: all mk-install-dirs install-cfg install-bin install-modules \
228 229
 	install-doc install-man
229 230
 
... ...
@@ -50,7 +50,7 @@ MAIN_NAME=ser
50 50
 VERSION = 0
51 51
 PATCHLEVEL = 8
52 52
 SUBLEVEL =   99
53
-EXTRAVERSION = -dev11
53
+EXTRAVERSION = -dev12
54 54
 
55 55
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
56 56
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
... ...
@@ -381,16 +381,21 @@ int add_interfaces(char* if_name, int family, unsigned short port,
381 381
 	
382 382
 	last=(char*)ifc.ifc_req+ifc.ifc_len;
383 383
 	for(p=(char*)ifc.ifc_req; p<last;
384
-			p+=(sizeof(ifr.ifr_name)+
385
-			#ifdef  HAVE_SOCKADDR_SA_LEN
386
-				MAX(ifr.ifr_addr.sa_len, sizeof(struct sockaddr))
384
+			p+=
385
+			#ifdef __OS_linux
386
+				sizeof(ifr) /* works on x86_64 too */
387 387
 			#else
388
-				( (ifr.ifr_addr.sa_family==AF_INET)?
389
-					sizeof(struct sockaddr_in):
390
-					((ifr.ifr_addr.sa_family==AF_INET6)?
388
+				(sizeof(ifr.ifr_name)+
389
+				#ifdef  HAVE_SOCKADDR_SA_LEN
390
+					MAX(ifr.ifr_addr.sa_len, sizeof(struct sockaddr))
391
+				#else
392
+					( (ifr.ifr_addr.sa_family==AF_INET)?
393
+						sizeof(struct sockaddr_in):
394
+						((ifr.ifr_addr.sa_family==AF_INET6)?
391 395
 						sizeof(struct sockaddr_in6):sizeof(struct sockaddr)) )
392
-			#endif
396
+				#endif
393 397
 				)
398
+			#endif
394 399
 		)
395 400
 	{
396 401
 		/* copy contents into ifr structure