$OpenBSD: patch-cupsppd_c,v 1.2 2009/01/31 12:36:59 ajacoutot Exp $ --- cupsppd.c.orig Tue Dec 23 18:13:38 2008 +++ cupsppd.c Sat Jan 31 12:57:38 2009 @@ -274,6 +274,10 @@ PPD_localizeIPPReason (PPD *self, PyObject *args, PyOb return NULL; buffer = malloc (bufsize); +#ifdef __OpenBSD__ // we need a newer CUPS + ret = Py_None; + Py_INCREF (Py_None); +#else if (ppdLocalizeIPPReason (self->ppd, reason, scheme, buffer, bufsize)) { ret = make_PyUnicode_from_ppd_string (self, buffer); @@ -281,6 +285,7 @@ PPD_localizeIPPReason (PPD *self, PyObject *args, PyOb ret = Py_None; Py_INCREF (Py_None); } +#endif // __OpenBSD__ free (buffer); return ret; @@ -507,7 +512,7 @@ PPD_nondefaultsMarked (PPD *self) return PyBool_FromLong (nondefaults_marked); } -#ifdef __SVR4 +#if defined(__SVR4) || defined(__OpenBSD__) /* * A rudimentary emulation of getline() for systems that dont support it * natively. Since this is used for PPD file reading, it assumes (possibly