diff --git a/hplip-strstr-const.patch b/hplip-strstr-const.patch new file mode 100644 index 0000000..96d4cb4 --- /dev/null +++ b/hplip-strstr-const.patch @@ -0,0 +1,36 @@ +diff -up hplip-3.9.2/prnt/hpijs/dj3320.cpp.strstr-const hplip-3.9.2/prnt/hpijs/dj3320.cpp +--- hplip-3.9.2/prnt/hpijs/dj3320.cpp.strstr-const 2009-02-20 00:38:04.000000000 +0000 ++++ hplip-3.9.2/prnt/hpijs/dj3320.cpp 2009-02-20 11:27:51.000000000 +0000 +@@ -403,7 +403,7 @@ DISPLAY_STATUS DJ3320::ParseError (BYTE + { + DRIVER_ERROR err = NO_ERROR; + BYTE byDevIDBuffer[DevIDBuffSize]; +- char *pcStr = NULL; ++ const char *pcStr = NULL; + BYTE byStatus1, byStatus2; + + memset(byDevIDBuffer, 0, sizeof(byDevIDBuffer)); +diff -up hplip-3.9.2/prnt/hpijs/registry.cpp.strstr-const hplip-3.9.2/prnt/hpijs/registry.cpp +--- hplip-3.9.2/prnt/hpijs/registry.cpp.strstr-const 2009-02-20 00:38:04.000000000 +0000 ++++ hplip-3.9.2/prnt/hpijs/registry.cpp 2009-02-20 11:27:00.000000000 +0000 +@@ -292,15 +292,15 @@ DRIVER_ERROR DeviceRegistry::SelectDevic + device = eDJ3320; + match = TRUE; + } +- char *cmdStr = strstr ((const char *) DevIDBuffer+2, "CMD:"); ++ const char *cmdStr = strstr ((const char *) DevIDBuffer+2, "CMD:"); + if (!cmdStr) + { + cmdStr = strstr ((const char *) DevIDBuffer+2, "COMMAND SET:"); + } +- if (!match && cmdStr && (strstr ((const char *) cmdStr+4, "POSTSCRIPT") || +- strstr ((const char *) cmdStr+4, "PostScript") || +- strstr ((const char *) cmdStr+4, "Postscript") || +- strstr ((const char *) cmdStr+4, "postscript") )) ++ if (!match && cmdStr && (strstr (cmdStr+4, "POSTSCRIPT") || ++ strstr (cmdStr+4, "PostScript") || ++ strstr (cmdStr+4, "Postscript") || ++ strstr (cmdStr+4, "postscript") )) + { + device = ePScript; + match = TRUE; diff --git a/hplip.spec b/hplip.spec index 456e815..ac7a902 100644 --- a/hplip.spec +++ b/hplip.spec @@ -1,7 +1,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.9.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and MIT Group: System Environment/Daemons Conflicts: system-config-printer < 0.6.132 @@ -326,7 +326,7 @@ fi exit 0 %changelog -* Fri Feb 20 2009 Tim Waugh 3.9.2-1 +* Fri Feb 20 2009 Tim Waugh 3.9.2-2 - 3.9.2. No longer need systray or quit patches. * Tue Jan 27 2009 Tim Waugh 2.8.12-7