[PATCH] Fix for building on Linux (glibc).

From: Johnny Oskarsson <joskar_AT_joskar.se>
Date: Thu, 7 Apr 2016 02:56:15 +0200

---
 Makefile | 2 +-
 main.c   | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 005046a..2b916d5 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -25,7 +25,7 @@ SOUNDOBJ = sndio.o
 OBJ += $(SOUNDOBJ)
 
 LIBS = ${XLIBS} ${SOUNDLIBS}
-CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${XFLAGS} ${SOUNDFLAGS}
+CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${XFLAGS} ${SOUNDFLAGS} -D_POSIX_C_SOURCE=200112L
 
 BIN = svmidi
 
diff --git a/main.c b/main.c
index 2368c71..3f0bdb9 100644
--- a/main.c
+++ b/main.c
_AT_@ -8,8 +8,10 @@
 #include <X11/XKBlib.h>	/* XkbSetDetectableAutoRepeat() */
 #include <X11/extensions/Xdbe.h> /* double buffer */
 
+typedef unsigned int uint;
+typedef unsigned long ulong;
+typedef unsigned char u_char;
 #include "midi.h"
-#include "util.h"
 
 /* future: implement alsa */
 #ifdef ALSA
_AT_@ -42,9 +44,6 @@ typedef struct {
 	char *name;
 } Instrument;
 
-typedef unsigned int uint;
-typedef unsigned long ulong;
-
 #include "config.h"
 
 /* Xlib */
-- 
2.4.6
--HG+GLK89HZ1zG0kk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="0001-Fix-undefined-reference-to-midisend-when-using-ALSA.patch"
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Thu Apr 07 2016 - 05:00:06 CEST