summaryrefslogtreecommitdiff
path: root/Ports/sam/patches
diff options
context:
space:
mode:
authorTimothy <timmot@users.noreply.github.com>2021-06-03 14:20:09 -0700
committerLinus Groh <mail@linusgroh.de>2021-06-06 00:17:37 +0100
commit65d4ac1c14db5336b4db0c99ac4a0efeea745dc1 (patch)
treee08b6624b41fcdd36e7ad191c01f1f3d17ffd7aa /Ports/sam/patches
parentb253b63bb4dc15218cd98380fef4f0485822c100 (diff)
downloadserenity-65d4ac1c14db5336b4db0c99ac4a0efeea745dc1.zip
Ports: Add sam
Diffstat (limited to 'Ports/sam/patches')
-rw-r--r--Ports/sam/patches/sam.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/Ports/sam/patches/sam.patch b/Ports/sam/patches/sam.patch
new file mode 100644
index 0000000000..e09df7da30
--- /dev/null
+++ b/Ports/sam/patches/sam.patch
@@ -0,0 +1,28 @@
+diff --git a/Makefile b/Makefile
+index 1153e0c..9c70190 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,8 +3,8 @@ OBJS = reciter.o sam.o render.o main.o debug.o processframes.o createtransitions
+ CC = gcc
+
+ # libsdl present
+-CFLAGS = -Wall -O2 -DUSESDL `sdl-config --cflags`
+-LFLAGS = `sdl-config --libs`
++CFLAGS = -Wall -O2 -DUSESDL -I../../SDL2/SDL-main-serenity/include -D_REENTRANT
++LFLAGS = -L../../SDL2 -lSDL2
+
+ # no libsdl present
+ #CFLAGS = -Wall -O2
+diff --git a/src/main.c b/src/main.c
+index 3e8fdde..3432fe8 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -14,7 +14,7 @@
+
+
+ // Approximations of some Windows functions to ease portability
+-#if defined __GNU_LIBRARY__ || defined __GLIBC__
++#if defined __GNU_LIBRARY__ || defined __GLIBC__ || defined __serenity__
+ static int min(int l, int r) { return l < r ? l : r; }
+ static void strcat_s(char * dest, int size, char * str) {
+ unsigned int dlen = strlen(dest);