$NetBSD: patch-am,v 1.3 2014/02/13 10:10:06 mrg Exp $ --- Top/csmodule.c.orig 2013-01-07 04:49:34.000000000 -0800 +++ Top/csmodule.c 2014-02-12 20:53:40.000000000 -0800 @@ -90,7 +90,7 @@ #endif #endif -#if defined(LINUX) || defined(NEW_MACH_CODE) || defined(__HAIKU__) +#if defined(LINUX) || defined(NEW_MACH_CODE) || defined(__HAIKU__) || defined(__NetBSD__) || defined(__DragonFly__) #include #elif defined(WIN32) #include @@ -143,7 +143,7 @@ # define CS_DEFAULT_PLUGINDIR "/boot/common/lib/csound/plugins64" # endif # endif -#elif !(defined(_CSOUND_RELEASE_) && (defined(LINUX) || defined(__MACH__))) +#elif !(defined(_CSOUND_RELEASE_) && (defined(LINUX) || defined(__MACH__) || defined(__NetBSD__) || defined(__DragonFly__))) # define ENABLE_OPCODEDIR_WARNINGS 1 # ifdef CS_DEFAULT_PLUGINDIR # undef CS_DEFAULT_PLUGINDIR @@ -153,9 +153,9 @@ # define ENABLE_OPCODEDIR_WARNINGS 0 # ifndef CS_DEFAULT_PLUGINDIR # ifndef USE_DOUBLE -# define CS_DEFAULT_PLUGINDIR "/usr/local/lib/csound/plugins" +# define CS_DEFAULT_PLUGINDIR __PKGSRC_PREFIX__ "lib/csound5/plugins" # else -# define CS_DEFAULT_PLUGINDIR "/usr/local/lib/csound/plugins64" +# define CS_DEFAULT_PLUGINDIR __PKGSRC_PREFIX__ "lib/csound5/plugins64" # endif # endif #endif @@ -258,7 +258,7 @@ err = csound->OpenLibrary(&h, libraryPath); if (UNLIKELY(err)) { char ERRSTR[256]; - #if defined(LINUX) || defined(__HAIKU__) + #if defined(LINUX) || defined(__HAIKU__) || defined(__NetBSD__) || defined(__DragonFly__) sprintf(ERRSTR, Str("could not open library '%s' (%s)"), libraryPath, dlerror()); #else @@ -964,7 +964,7 @@ return (void*) GetProcAddress((HMODULE) library, procedureName); } -#elif defined(LINUX) || defined (NEW_MACH_CODE) || defined(__HAIKU__) +#elif defined(LINUX) || defined (NEW_MACH_CODE) || defined(__HAIKU__) || defined(__NetBSD__) || defined(__DragonFly__) PUBLIC int csoundOpenLibrary(void **library, const char *libraryPath) { @@ -1358,7 +1358,7 @@ fareyseq_localops_init, hrtfearly_localops_init, hrtfreverb_localops_init, minmax_localops_init, vaops_localops_init, -#if defined(__MACH__) || defined(LINUX) || defined(__HAIKU__) +#if defined(__MACH__) || defined(LINUX) || defined(__HAIKU__) || defined(__NetBSD__) || defined(__DragonFly__) cpumeter_localops_init, #endif mp3in_localops_init, gendy_localops_init,