From b19a55b32ef04e6d567add4dd475a9b7315b49df Mon Sep 17 00:00:00 2001 From: Ben Greear Date: Wed, 1 Feb 2012 15:33:22 -0800 Subject: [PATCH] freebsd: Fix raw sockets on FreeBSD. Seems I broke this in commit 6711ba5156552bafdaffd8fbf2350c9b7c39d08e "raw-sockets: Assume platforms support raw socket input/output." Reported, bisected and tested by: Edwin Schokkenbroek Signed-off-by: Ben Greear --- xorp/site_scons/config/allconfig.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xorp/site_scons/config/allconfig.py b/xorp/site_scons/config/allconfig.py index 16e3d4ab3..f90f6aed7 100644 --- a/xorp/site_scons/config/allconfig.py +++ b/xorp/site_scons/config/allconfig.py @@ -21,6 +21,7 @@ import os import string from SCons.Script.SConscript import SConsEnvironment +import fnmatch; # TODO SCons support for headerfilename needs to be fixed at source-- # that would let us use confdefs.h for the include file header @@ -226,10 +227,11 @@ def DoAllConfig(env, conf, host_os): if has_af_inet and has_sock_raw: conf.Define('HAVE_IP_RAW_SOCKETS') # TODO: This needs to be properly detected. - # TODO: This used to check for bsd and linux in an error prone - # way. Now, do negative checks, but this could break Solaris + # TODO: This used to check for openbsd and linux in an error prone + # way. Now, do negative checks, but this could break Solaris and other OS # (or not..no idea if it supports raw or not). - if not (env.has_key('mingw') and env['mingw']): + if not ((env.has_key('mingw') and env['mingw']) or + fnmatch.fnmatch(host_os, 'freebsd*')): conf.Define('IPV4_RAW_OUTPUT_IS_RAW') conf.Define('IPV4_RAW_INPUT_IS_RAW')