Index: Lib/distutils/util.py =================================================================== --- Lib/distutils/util.py (revision 62926) +++ Lib/distutils/util.py (working copy) @@ -116,6 +116,9 @@ def get_platform (): # Pick a sane name for the PPC architecture. machine = 'ppc' + elif osname[:9] == "dragonfly": + release = string.split(release, "-")[0] + return "%s-%s-%s" % (osname, release, machine) # get_platform () Index: Modules/_ctypes/libffi/configure =================================================================== --- Modules/_ctypes/libffi/configure (revision 62926) +++ Modules/_ctypes/libffi/configure (working copy) @@ -3486,6 +3486,7 @@ i*86-*-beos*) TARGET=X86; TARGETDIR=x86; i*86-*-freebsd* | i*86-*-kfreebsd*-gnu) TARGET=X86; TARGETDIR=x86;; i*86-*-netbsdelf* | i*86-*-knetbsd*-gnu) TARGET=X86; TARGETDIR=x86;; i*86-*-openbsd*) TARGET=X86; TARGETDIR=x86;; +i*86-*-dragonfly*) TARGET=X86; TARGETDIR=x86;; i*86-*-rtems*) TARGET=X86; TARGETDIR=x86;; i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;; i*86-*-cygwin*) TARGET=X86_WIN32; TARGETDIR=x86;; @@ -3516,7 +3517,7 @@ arm*-*-rtems*) TARGET=ARM; TARGETDIR=arm cris-*-*) TARGET=LIBFFI_CRIS; TARGETDIR=cris;; s390-*-linux-*) TARGET=S390; TARGETDIR=s390;; s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;; -x86_64-*-linux* | x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) TARGET=X86_64; TARGETDIR=x86;; +x86_64-*-linux* | x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu | x86_64-*-dragonfly*) TARGET=X86_64; TARGETDIR=x86;; sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;; sh-*-rtems*) TARGET=SH; TARGETDIR=sh;; sh64-*-linux* | sh5*-*-linux*) TARGET=SH64; TARGETDIR=sh64;; Index: Modules/socketmodule.c =================================================================== --- Modules/socketmodule.c (revision 62926) +++ Modules/socketmodule.c (working copy) @@ -357,7 +357,8 @@ const char *inet_ntop(int af, const void #define SOCKETCLOSE close #endif -#if defined(HAVE_BLUETOOTH_H) || defined(HAVE_BLUETOOTH_BLUETOOTH_H) +#if (defined(HAVE_BLUETOOTH_H) || defined(HAVE_BLUETOOTH_BLUETOOTH_H)) && \ + !defined(__NetBSD__) && !defined(__DragonFly__) #define USE_BLUETOOTH 1 #if defined(__FreeBSD__) #define BTPROTO_L2CAP BLUETOOTH_PROTO_L2CAP