winspool.drv: Include <cups/ppd.h> to fix building against the macOS 10.12 SDK.

Ken Thomases ken at codeweavers.com
Mon Jun 27 15:34:07 CDT 2016


The cupsGetPPD() function was moved there from <cups/cups.h> because it's
deprecated.

Signed-off-by: Ken Thomases <ken at codeweavers.com>
---
For <https://bugs.winehq.org/show_bug.cgi?id=40851>.

 configure.ac             | 3 ++-
 dlls/winspool.drv/info.c | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 7f234b2..e7c1dd1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1543,7 +1543,8 @@ then
     AC_CHECK_HEADERS(cups/cups.h,
             [WINE_CHECK_SONAME(cups,cupsGetDefault,
                        [CUPS_CFLAGS="$ac_cups_cflags"],,
-                       [$ac_cups_libs])])
+                       [$ac_cups_libs])
+             AC_CHECK_HEADERS(cups/ppd.h)])
     CPPFLAGS="$ac_save_CPPFLAGS"
 fi
 WINE_NOTICE_WITH(cups,[test "x$ac_cv_lib_soname_cups" = "x"],
diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index 3ba94cd..bc85311 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -44,6 +44,9 @@
 #ifdef HAVE_CUPS_CUPS_H
 # include <cups/cups.h>
 #endif
+#ifdef HAVE_CUPS_PPD_H
+# include <cups/ppd.h>
+#endif
 
 #ifdef HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H
 #define GetCurrentProcess GetCurrentProcess_Mac
-- 
2.8.2




More information about the wine-patches mailing list