aboutsummaryrefslogtreecommitdiff
path: root/ports/libplist/dllexport.patch
blob: f5e0062104bfb087b9d6695d43de9f95d2476c99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff --git a/include/plist/plist.h b/include/plist/plist.h
index 2863c74..9cdb219 100644
--- a/include/plist/plist.h
+++ b/include/plist/plist.h
@@ -42,7 +42,7 @@ extern "C"
 #include <stdint.h>
 #endif
 
-#ifdef _MSC_VER 
+#if defined(_MSC_VER) && defined(LIBPLIST_EXPORTS)
 #define PLIST_API_MSC __declspec( dllexport ) 
 #else  
 #define PLIST_API_MSC 
diff --git a/src/plist.h b/src/plist.h
index 1e5d0d1..6690343 100644
--- a/src/plist.h
+++ b/src/plist.h
@@ -39,10 +39,7 @@
 #include <sys/time.h>
 #endif
 
-#ifdef _MSC_VER
-  #define PLIST_API __declspec( dllexport )
-#else
-#ifdef WIN32
+#if (defined(_MSC_VER) || defined(WIN32)) && defined(LIBPLIST_EXPORTS)
   #define PLIST_API __declspec( dllexport )
 #else
   #ifdef HAVE_FVISIBILITY
@@ -51,7 +48,6 @@
     #define PLIST_API
   #endif
 #endif
-#endif
 
 struct plist_data_s
 {