mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-25 04:43:09 -04:00
Small linux fixes
This commit is contained in:
parent
074020fcb8
commit
2c029ddd15
@ -11,7 +11,11 @@ AC_PROG_CC
|
|||||||
|
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
|
|
||||||
|
AM_CONDITIONAL(COND_REND_OSX,false)
|
||||||
|
|
||||||
AC_ARG_ENABLE(debug,Enable debugging features,CPPFLAGS="$CPPFLAGS -DDEBUG -g")
|
AC_ARG_ENABLE(debug,Enable debugging features,CPPFLAGS="$CPPFLAGS -DDEBUG -g")
|
||||||
|
AC_ARG_ENABLE(efence,Enable electric fence,LDFLAGS="$LDFLAGS -lefence")
|
||||||
|
|
||||||
AC_ARG_ENABLE(howl,[ --enable-howl Use the howl mDNS library],
|
AC_ARG_ENABLE(howl,[ --enable-howl Use the howl mDNS library],
|
||||||
[ case "${enableval}" in
|
[ case "${enableval}" in
|
||||||
yes) rend_howl=true; LDFLAGS="${LDFLAGS} -lrendezvous -lcorby -lsalt";;
|
yes) rend_howl=true; LDFLAGS="${LDFLAGS} -lrendezvous -lcorby -lsalt";;
|
||||||
@ -26,7 +30,7 @@ dnl Darwin's stupid cpp preprocessor....
|
|||||||
echo Host type is $host
|
echo Host type is $host
|
||||||
case $host in
|
case $host in
|
||||||
*linux*)
|
*linux*)
|
||||||
CPPFLAGS="$CPPFLAGS -DHAVE_SOCKLEN_T"; LDFLAGS="$LDFLAGS -lefence";;
|
CPPFLAGS="$CPPFLAGS -DHAVE_SOCKLEN_T";;
|
||||||
*darwin*)
|
*darwin*)
|
||||||
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -DHAVE_SOCKADDR_SA_LEN -DHAVE_SOCKLEN_T"
|
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -DHAVE_SOCKADDR_SA_LEN -DHAVE_SOCKLEN_T"
|
||||||
LDFLAGS="$LDFLAGS -framework CoreFoundation"
|
LDFLAGS="$LDFLAGS -framework CoreFoundation"
|
||||||
|
@ -41,8 +41,10 @@ typedef struct tag_err_leak {
|
|||||||
int err_debuglevel=0;
|
int err_debuglevel=0;
|
||||||
int err_logdestination=LOGDEST_STDERR;
|
int err_logdestination=LOGDEST_STDERR;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
pthread_mutex_t err_mutex=PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t err_mutex=PTHREAD_MUTEX_INITIALIZER;
|
||||||
ERR_LEAK err_leak = { NULL, NULL, 0, 0, NULL };
|
ERR_LEAK err_leak = { NULL, NULL, 0, 0, NULL };
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Forwards
|
* Forwards
|
||||||
|
@ -48,9 +48,9 @@ extern void log_setdest(char *app, int destination);
|
|||||||
# define malloc(x) err_malloc(__FILE__,__LINE__,x)
|
# define malloc(x) err_malloc(__FILE__,__LINE__,x)
|
||||||
# define strdup(x) err_strdup(__FILE__,__LINE__,x)
|
# define strdup(x) err_strdup(__FILE__,__LINE__,x)
|
||||||
# define free(x) err_free(__FILE__,__LINE__,x)
|
# define free(x) err_free(__FILE__,__LINE__,x)
|
||||||
# define MEMNOTIFY(x) err_notify(__FILE__,__LINE__,x)
|
|
||||||
# endif /* __IN_ERR__ */
|
# endif /* __IN_ERR__ */
|
||||||
|
|
||||||
|
# define MEMNOTIFY(x) err_notify(__FILE__,__LINE__,x)
|
||||||
|
|
||||||
extern void *err_malloc(char *file, int line, size_t size);
|
extern void *err_malloc(char *file, int line, size_t size);
|
||||||
extern char *err_strdup(char *file, int line, const char *str);
|
extern char *err_strdup(char *file, int line, const char *str);
|
||||||
@ -58,6 +58,7 @@ extern void err_free(char *file, int line, void *ptr);
|
|||||||
extern void err_notify(char *file, int line, void *ptr);
|
extern void err_notify(char *file, int line, void *ptr);
|
||||||
extern void err_leakcheck(void);
|
extern void err_leakcheck(void);
|
||||||
|
|
||||||
|
#else
|
||||||
|
# define MEMNOTIFY(x)
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
#endif /* __ERR_H__ */
|
#endif /* __ERR_H__ */
|
||||||
|
@ -26,10 +26,11 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pthread.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -3,3 +3,4 @@ port 3689
|
|||||||
admin_pw secret
|
admin_pw secret
|
||||||
mp3_dir mp3
|
mp3_dir mp3
|
||||||
servername Ron's Secret Stash
|
servername Ron's Secret Stash
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user