Changeset 478 for vendor/current/lib/replace
- Timestamp:
- Aug 2, 2010, 6:40:21 PM (15 years ago)
- Location:
- vendor/current/lib/replace
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/lib/replace/libreplace_network.m4
r414 r478 351 351 fi 352 352 353 dnl Some old Linux systems have broken header files and 354 dnl miss the IPV6_V6ONLY define in netinet/in.h, 355 dnl but have it in linux/in6.h. 356 dnl We can't include both files so we just check if the value 357 dnl if defined and do the replacement in system/network.h 358 AC_CACHE_CHECK([for IPV6_V6ONLY support],libreplace_cv_HAVE_IPV6_V6ONLY,[ 359 AC_TRY_COMPILE([ 360 #include <stdlib.h> /* for NULL */ 361 #include <sys/socket.h> 362 #include <sys/types.h> 363 #include <netdb.h> 364 #include <netinet/in.h> 365 ], 366 [ 367 #ifndef IPV6_V6ONLY 368 #error no IPV6_V6ONLY 369 #endif 370 ],[ 371 libreplace_cv_HAVE_IPV6_V6ONLY=yes 372 ],[ 373 libreplace_cv_HAVE_IPV6_V6ONLY=no 374 ]) 375 ]) 376 if test x"$libreplace_cv_HAVE_IPV6_V6ONLY" != x"yes"; then 377 dnl test for IPV6_V6ONLY 378 AC_CACHE_CHECK([for IPV6_V6ONLY in linux/in6.h],libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26,[ 379 AC_TRY_COMPILE([ 380 #include <linux/in6.h> 381 ], 382 [ 383 #if (IPV6_V6ONLY != 26) 384 #error no linux IPV6_V6ONLY 385 #endif 386 ],[ 387 libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26=yes 388 ],[ 389 libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26=no 390 ]) 391 ]) 392 if test x"$libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26" = x"yes"; then 393 AC_DEFINE(HAVE_LINUX_IPV6_V6ONLY_26,1,[Whether the system has IPV6_V6ONLY in linux/in6.h]) 394 fi 395 fi 396 353 397 dnl test for ipv6 354 398 AC_CACHE_CHECK([for ipv6 support],libreplace_cv_HAVE_IPV6,[ … … 371 415 } 372 416 freeaddrinfo(ai); 417 { 418 int val = 1; 419 #ifdef HAVE_LINUX_IPV6_V6ONLY_26 420 #define IPV6_V6ONLY 26 421 #endif 422 ret = setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, 423 (const void *)&val, sizeof(val)); 424 } 373 425 ],[ 374 426 libreplace_cv_HAVE_IPV6=yes -
vendor/current/lib/replace/system/network.h
r414 r478 361 361 #endif 362 362 363 /* Some old Linux systems have broken header files */ 364 #ifdef HAVE_IPV6 365 #ifdef HAVE_LINUX_IPV6_V6ONLY_26 366 #define IPV6_V6ONLY 26 367 #endif /* HAVE_LINUX_IPV6_V6ONLY_26 */ 368 #endif /* HAVE_IPV6 */ 369 363 370 #ifdef SOCKET_WRAPPER 364 371 #ifndef SOCKET_WRAPPER_DISABLE
Note:
See TracChangeset
for help on using the changeset viewer.