1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

- Fix build with clang

- While at it, get rid of PTHREAD_LIBS
This commit is contained in:
Pietro Cerutti 2013-03-18 11:04:01 +00:00
parent 575fd3024e
commit 0f2ec5f717
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=314551
2 changed files with 30 additions and 5 deletions

View File

@ -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:

View File

@ -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");