diff '--color=auto' -up epson-inkjet-printer-escpr2-1.2.3/src/filter.c epson-inkjet-printer-escpr2-1.2.3_mod/src/filter.c
--- epson-inkjet-printer-escpr2-1.2.3/src/filter.c	2023-06-08 13:53:38.000000000 +0800
+++ epson-inkjet-printer-escpr2-1.2.3_mod/src/filter.c	2025-06-09 22:11:11.316042023 +0800
@@ -39,6 +39,7 @@
 #include "epson-escpr-api.h"
 #include "epson-escpr-services.h"
 #include "epson-escpr-mem.h"
+#include "epson-escpr-services.h"
 
 #include "err.h"
 #include "mem.h"
@@ -47,6 +48,12 @@
 #include "libprtX.h"
 #include "optBase.h"
 #include "linux_cmn.h"
+#include "xfifo.h"
+
+extern EPS_ERR_CODE SetupJobAttrib (const EPS_JOB_ATTRIB*);
+extern EPS_ERR_CODE SendStartJob (int);
+extern EPS_ERR_CODE PrintBand (const EPS_UINT8*, EPS_UINT32, EPS_UINT32*);
+
 
 #define WIDTH_BYTES(bits) (((bits) + 31) / 32 * 4)
 
@@ -430,7 +437,7 @@ main (int argc, char *argv[])
 	}
 	
 	printJob.jobStatus = EPS_STATUS_ESTABLISHED;
-	int printHeight = 0;
+	EPS_UINT32 printHeight = 0;
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////	
 
 	print_area_x = printJob.printableAreaWidth;
@@ -604,7 +611,7 @@ main (int argc, char *argv[])
 						memcpy(rever_buf + k*3, startpage + pos + (bandBmp.widthBytes - 6) - k*3, 3);
 					}
 				}
-				PrintBand (rever_buf, bandBmp.widthBytes, &printHeight);
+				PrintBand ((const EPS_UINT8 *)rever_buf, bandBmp.widthBytes, &printHeight);
 				pos -= bandBmp.widthBytes;
 			}
 
@@ -897,7 +904,7 @@ set_pips_parameter (filter_option_t *fil
 
 	/* Get number of pages */
 	char page_num;
-	read (STDIN_FILENO, &page_num, 1);
+	(void)read (STDIN_FILENO, &page_num, 1);
 	debug_msg("total pages = %d\n", page_num);
 
 	/* Others */
diff '--color=auto' -up epson-inkjet-printer-escpr2-1.2.3/src/mem.c epson-inkjet-printer-escpr2-1.2.3_mod/src/mem.c
--- epson-inkjet-printer-escpr2-1.2.3/src/mem.c	2023-02-15 10:57:29.000000000 +0800
+++ epson-inkjet-printer-escpr2-1.2.3_mod/src/mem.c	2025-06-09 22:09:42.622069865 +0800
@@ -23,6 +23,7 @@
 
 #include <stdlib.h>
 #include "mem.h"
+#include "err.h"
 
 void *
 mem_malloc (unsigned int size, bool_t crit)
