From 14ba56440792f43b72c9f80fda2a65851da85b24 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 27 Nov 2025 08:06:08 -0800
Subject: [PATCH] Fixed building on Windows
---
maclib/macres.cpp | 4 ++++
utils/files.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/maclib/macres.cpp b/maclib/macres.cpp
index 9ce61041..6f4a9a34 100644
--- a/maclib/macres.cpp
+++ b/maclib/macres.cpp
@@ -26,6 +26,10 @@
#include "Mac_Resource.h"
#include "Mac_Wave.h"
+#ifndef PATH_MAX
+#define PATH_MAX 256
+#endif
+
static SDL_Color colors[256] = {
/* Gamma level 3 */
{ 0xff, 0xff, 0xff, 0xFF }, /* Pixel 0 */
diff --git a/utils/files.c b/utils/files.c
index 0cc7d644..fcb60395 100644
--- a/utils/files.c
+++ b/utils/files.c
@@ -20,6 +20,10 @@
#include "files.h"
+#ifndef PATH_MAX
+#define PATH_MAX 256
+#endif
+
static const char *storage_org;
static const char *storage_app;
static char datapath[PATH_MAX];