summaryrefslogtreecommitdiff
path: root/audio/sbagen
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2013-03-18 11:04:01 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2013-03-18 11:04:01 +0000
commit0f2ec5f7170c5da97978d87754b2c9dae2588e87 (patch)
tree3b10728d6e9f10754af1a4d959b5fe660f6cefbb /audio/sbagen
parent- Update to 0.2.4 (diff)
- Fix build with clang
- While at it, get rid of PTHREAD_LIBS
Notes
Notes: svn path=/head/; revision=314551
Diffstat (limited to 'audio/sbagen')
-rw-r--r--audio/sbagen/Makefile6
-rw-r--r--audio/sbagen/files/patch-sbagen.c29
2 files changed, 30 insertions, 5 deletions
diff --git a/audio/sbagen/Makefile b/audio/sbagen/Makefile
index a6fd02e65e92..bfbc9e5c1bce 100644
--- a/audio/sbagen/Makefile
+++ b/audio/sbagen/Makefile
@@ -19,12 +19,8 @@ OPTIONS_DEFINE= DOCS EXAMPLES
.include <bsd.port.options.mk>
-post-patch:
- @${REINPLACE_CMD} -e 's,linux/soundcard\.h,sys/soundcard.h,g' \
- ${WRKSRC}/sbagen.c
-
do-build:
- (cd ${WRKSRC} && ${CC} ${CFLAGS} -DT_LINUX ${PTHREAD_LIBS} -lm \
+ (cd ${WRKSRC} && ${CC} ${CFLAGS} -DT_LINUX -pthread -lm \
sbagen.c -o sbagen)
do-install:
diff --git a/audio/sbagen/files/patch-sbagen.c b/audio/sbagen/files/patch-sbagen.c
new file mode 100644
index 000000000000..b63673e5347a
--- /dev/null
+++ b/audio/sbagen/files/patch-sbagen.c
@@ -0,0 +1,29 @@
+--- sbagen.c.orig 2013-03-18 12:02:21.000000000 +0100
++++ sbagen.c 2013-03-18 12:02:43.000000000 +0100
+@@ -141,7 +141,7 @@
+ #endif
+
+ #ifdef OSS_AUDIO
+- #include <linux/soundcard.h>
++ #include <sys/soundcard.h>
+ //WAS: #include <sys/soundcard.h>
+ #endif
+ #ifdef WIN_AUDIO
+@@ -181,7 +181,7 @@
+ void warn(char *fmt, ...) ;
+ void * Alloc(size_t len) ;
+ char * StrDup(char *str) ;
+-inline int calcNow() ;
++static inline int calcNow() ;
+ void loop() ;
+ void outChunk() ;
+ void corrVal(int ) ;
+@@ -1207,7 +1207,7 @@
+ time_ref_ms= 1000*tt->tm_sec + 60000*tt->tm_min + 3600000*tt->tm_hour;
+ }
+
+-inline int
++static inline int
+ calcNow() {
+ struct timeval tv;
+ if (0 != gettimeofday(&tv, 0)) error("Can't get current time");