From 10db5f308ef3dd29d01422bbb85586b8579100cd Mon Sep 17 00:00:00 2001
From: Michael R Sweet <msweet@msweet.org>
Date: Mon, 13 Apr 2026 14:17:58 -0400
Subject: [PATCH] Fix builds on systems that don't define OFF_MAX.

---
 scheduler/conf.c | 6 ++++++
 1 file changed, 6 insertions(+)

--- a/scheduler/conf.c
+++ b/scheduler/conf.c
@@ -2771,7 +2771,13 @@ parse_variable(
 	    }
 	  }
 
+#ifdef OFF_MAX
 	  if (n < 0 || n > (double)OFF_MAX)
+#elif defined(LLONG_MAX)
+	  if (n < 0 || n > (double)LLONG_MAX)
+#else
+	  if (n < 0 || n > (double)LONG_MAX)
+#endif /* OFF_MAX */
 	  {
 	    cupsdLogMessage(CUPSD_LOG_ERROR, "Bad size value for %s on line %d of %s.", line, linenum, filename);
 	    return (0);
