diff options
author | gahr <gahr@FreeBSD.org> | 2013-03-18 19:04:01 +0800 |
---|---|---|
committer | gahr <gahr@FreeBSD.org> | 2013-03-18 19:04:01 +0800 |
commit | cc22f51da29164591212153fbe1c2d2ffdef96e7 (patch) | |
tree | 3b10728d6e9f10754af1a4d959b5fe660f6cefbb /audio/sbagen | |
parent | 06f1ee128008d2726ac28b8328163d51fbccabab (diff) | |
download | freebsd-ports-gnome-cc22f51da29164591212153fbe1c2d2ffdef96e7.tar.gz freebsd-ports-gnome-cc22f51da29164591212153fbe1c2d2ffdef96e7.tar.zst freebsd-ports-gnome-cc22f51da29164591212153fbe1c2d2ffdef96e7.zip |
- Fix build with clang
- While at it, get rid of PTHREAD_LIBS
Diffstat (limited to 'audio/sbagen')
-rw-r--r-- | audio/sbagen/Makefile | 6 | ||||
-rw-r--r-- | audio/sbagen/files/patch-sbagen.c | 29 |
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"); |