From 27ea8fa99f84d96618d75a8245364457585bc5e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 23 Apr 2014 14:55:38 +0200 Subject: [PATCH] QCocoaPrintDevice: Compile on Mac OS 10.6 MAXPATHLEN is not defined, use PATH_MAX. Change-Id: I5a8febce66584c15bdfe81df64fe3f1954972a47 Reviewed-by: Andy Shaw --- src/plugins/platforms/cocoa/qcocoaprintdevice.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoaprintdevice.mm b/src/plugins/platforms/cocoa/qcocoaprintdevice.mm index 57d5c800e08..7322025df67 100644 --- a/src/plugins/platforms/cocoa/qcocoaprintdevice.mm +++ b/src/plugins/platforms/cocoa/qcocoaprintdevice.mm @@ -463,7 +463,11 @@ bool QCocoaPrintDevice::openPpdFile() ppdClose(m_ppd); m_ppd = 0; CFURLRef ppdURL = NULL; +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 + char ppdPath[PATH_MAX]; +#else char ppdPath[MAXPATHLEN]; +#endif if (PMPrinterCopyDescriptionURL(m_printer, kPMPPDDescriptionType, &ppdURL) == noErr && ppdURL != NULL && CFURLGetFileSystemRepresentation(ppdURL, true, (UInt8*)ppdPath, sizeof(ppdPath))) {