diff -bur portsmf-orig/allegro.h portsmf/allegro.h
--- portsmf-orig/allegro.h	2023-02-01 11:58:52.522295100 -0700
+++ portsmf/allegro.h	2023-02-01 11:59:12.255429600 -0700
@@ -552,7 +552,7 @@
 #pragma warning(disable: 546) // cast to int is OK, we only want low 7 bits
 #pragma warning(disable: 4311) // type cast pointer to long warning
 #endif
-    void get_pad() { while (((long) ptr) & 7) ptr++; }
+    void get_pad() { while (((uintptr_t) ptr) & 7) ptr++; }
 #if defined(_WIN32)
 #pragma warning(default: 4311 546)
 #endif
@@ -609,7 +609,7 @@
 #if defined(_WIN32)
 #pragma warning(disable: 4311 4312)
 #endif
-        assert((char *)(((long) (ptr + 7)) & ~7) <= fence);
+        assert((char *)(((uintptr_t) (ptr + 7)) & ~7) <= fence);
 #if defined(_WIN32)
 #pragma warning(default: 4311 4312)
 #endif
@@ -622,7 +622,7 @@
 #pragma warning(disable: 546) // cast to int is OK, we only want low 7 bits
 #pragma warning(disable: 4311) // type cast pointer to long warning
 #endif
-    void pad() { while (((long) ptr) & 7) set_char(0); }
+    void pad() { while (((uintptr_t) ptr) & 7) set_char(0); }
 #if defined(_WIN32)
 #pragma warning(default: 4311 546)
 #endif
