Summary: | ipprequest.cpp:521: error: `_ipp_free_attr' undeclared (first use this function) | ||
---|---|---|---|
Product: | [Unmaintained] kdeprint | Reporter: | Matthew Carson <matthew.carson> |
Component: | general | Assignee: | KDEPrint Devel Mailinglist <kde-print-devel> |
Status: | CLOSED DUPLICATE | ||
Severity: | normal | CC: | jlayt |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Matthew Carson
2006-04-26 09:19:32 UTC
Apparently, the patch was reversed in 3.5 branch because it doesn't work with older version of CUPS. I guess that some #ifdef would solve it. *** This bug has been marked as a duplicate of 124157 *** Great, but Im not a C developer tho ! :@( is there a simple patch I could use - how do I fix this pls ? Michael Goffioul wrote: [bugs.kde.org quoted mail] > > is there a simple patch I could use - how do I fix this pls ?
Yes. Look below. This is also commited to the 3.5 SVN branch right now.
Index: ipprequest.cpp
===================================================================
--- ipprequest.cpp (revision 534402)
+++ ipprequest.cpp (working copy)
@@ -511,7 +511,11 @@
cupsFreeOptions(n, options);
// find an remove that annoying "document-format" attribute
- // (can't use IppDeleteAttribute as cups 1.0.9 doesn't have that)
+#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2
+ ipp_attribute_t *attr = ippFindAttribute(request_, "document-format",
IPP_TAG_NAME);
+ ippDeleteAttribute(request_, attr);
+#else
+ // (can't use IppDeleteAttribute as older cups doesn't have that)
ipp_attribute_t *attr = request_->attrs;
while (attr)
{
@@ -524,4 +528,5 @@
}
attr = attr->next;
}
+#endif
}
*** *** *** *** *** *** *** *** with special thanks to : Cristian Tibirna, KDE developer *** *** *** *** *** *** *** *** Closing old Resolved status bug. |