Browse code

- missing #ifdef USE_IPV6 (reported by bogdan)

Andrei Pelinescu-Onciul authored on 13/12/2002 16:24:02
Showing 1 changed files
... ...
@@ -212,9 +212,11 @@ static inline int su_cmp(union sockaddr_union* s1, union sockaddr_union* s2)
212 212
 		case AF_INET:
213 213
 			return (s1->sin.sin_port==s2->sin.sin_port)&&
214 214
 					(memcmp(&s1->sin.sin_addr, &s2->sin.sin_addr, 4)==0);
215
+#ifdef USE_IPV6
215 216
 		case AF_INET6:
216 217
 			return (s1->sin6.sin6_port==s2->sin6.sin6_port)&&
217 218
 					(memcmp(&s1->sin6.sin6_addr, &s2->sin6.sin6_addr, 16)==0);
219
+#endif
218 220
 		default:
219 221
 			LOG(L_CRIT,"su_cmp: BUG: unknown address family %d\n",
220 222
 						s1->s.sa_family);
... ...
@@ -230,8 +232,10 @@ static inline short su_getport(union sockaddr_union* su)
230 230
 	switch(su->s.sa_family){
231 231
 		case AF_INET:
232 232
 			return su->sin.sin_port;
233
+#ifdef USE_IPV6
233 234
 		case AF_INET6:
234 235
 			return su->sin6.sin6_port;
236
+#endif
235 237
 		default:
236 238
 			LOG(L_CRIT,"su_get_port: BUG: unknown address family %d\n",
237 239
 						su->s.sa_family);