--- a/src/dvdcss/dvdcss.h
+++ b/src/dvdcss/dvdcss.h
@@ -57,12 +57,11 @@
 
 
 #if defined(WIN32)
-#ifdef LIBDVDCSS_EXPORTS
+#if defined(LIBDVDCSS_EXPORT)
 #define LIBDVDCSS_EXPORT __declspec(dllexport) extern
+#elif defined(LIBDVDCSS_IMPORT)
+#define LIBDVDCSS_EXPORT __declspec(dllimport) extern
 #else
-#define LIBDVDCSS_EXPORT __declspec(dllimport) extern
-#endif
-#else /* not WIN32 */
 #define LIBDVDCSS_EXPORT extern
 #endif