diff --git a/libs/wine/config.c b/libs/wine/config.c
index 4eb446258cc..34ede6ed0a6 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -60,7 +60,7 @@ static void fatal_error( const char *err, ... )  __attribute__((noreturn,format(
 
 #if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
 static const char exe_link[] = "/proc/self/exe";
-#else
+#elif ! defined (__FreeBSD__) && ! defined(__DragonFly__)
 static const char exe_link[] = "";
 #endif