mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-09 04:38:10 -05:00
Fix for "my libc doesn't have atoll" bug.
This commit is contained in:
parent
133e971edc
commit
b8e421d8df
@ -56,6 +56,7 @@ AM_CONDITIONAL(COND_OGGVORBIS, test x$use_oggvorbis = xtrue)
|
|||||||
|
|
||||||
AM_CONDITIONAL(COND_NEED_STRCASESTR,false)
|
AM_CONDITIONAL(COND_NEED_STRCASESTR,false)
|
||||||
AM_CONDITIONAL(COND_NEED_STRSEP,false)
|
AM_CONDITIONAL(COND_NEED_STRSEP,false)
|
||||||
|
AM_CONDITIONAL(COND_NEED_ATOLL,false)
|
||||||
|
|
||||||
dnl Darwin's stupid cpp preprocessor....
|
dnl Darwin's stupid cpp preprocessor....
|
||||||
echo Host type is $host
|
echo Host type is $host
|
||||||
@ -195,6 +196,7 @@ fi
|
|||||||
|
|
||||||
AC_REPLACE_FUNCS(strcasestr)
|
AC_REPLACE_FUNCS(strcasestr)
|
||||||
AC_REPLACE_FUNCS(strsep)
|
AC_REPLACE_FUNCS(strsep)
|
||||||
|
AC_REPLACE_FUNCS(atoll)
|
||||||
|
|
||||||
dnl Checks for header files.
|
dnl Checks for header files.
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
|
@ -28,10 +28,11 @@ mt_daapd_SOURCES = main.c daapd.h rend.h uici.c uici.h webserver.c \
|
|||||||
mp3-scanner.h mp3-scanner.c playlist.c playlist.h \
|
mp3-scanner.h mp3-scanner.c playlist.c playlist.h \
|
||||||
rend-unix.h lexer.l parser.y strcasestr.c strcasestr.h strsep.c \
|
rend-unix.h lexer.l parser.y strcasestr.c strcasestr.h strsep.c \
|
||||||
redblack.c redblack.h dynamic-art.c dynamic-art.h query.c query.h \
|
redblack.c redblack.h dynamic-art.c dynamic-art.h query.c query.h \
|
||||||
|
atoll.c atoll.h \
|
||||||
$(PRENDSRC) $(ORENDSRC) $(HRENDSRC) $(OGGVORBISSRC)
|
$(PRENDSRC) $(ORENDSRC) $(HRENDSRC) $(OGGVORBISSRC)
|
||||||
|
|
||||||
EXTRA_DIST = mDNS.c mDNSClientAPI.h mDNSDebug.h mDNSPosix.c \
|
EXTRA_DIST = mDNS.c mDNSClientAPI.h mDNSDebug.h mDNSPosix.c \
|
||||||
mDNSUNP.c mDNSPlatformFunctions.h mDNSPosix.h mDNSUNP.h \
|
mDNSUNP.c mDNSPlatformFunctions.h mDNSPosix.h mDNSUNP.h \
|
||||||
rend-howl.c rend-posix.c rend-osx.c strcasestr.c strsep.c db-memory.c \
|
rend-howl.c rend-posix.c rend-osx.c db-memory.c \
|
||||||
db-gdbm.c strcasestr.h redblack.c redblack.h db-memory.c \
|
db-gdbm.c strcasestr.h redblack.c redblack.h db-memory.c \
|
||||||
parser.h ogg.c
|
parser.h ogg.c
|
||||||
|
24
src/atoll.c
Normal file
24
src/atoll.c
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* $Id$
|
||||||
|
*
|
||||||
|
* The only platform I know without atoll is OSX 10.2, and it has
|
||||||
|
* 32 bit inodes, so this will be a fine workaround until such time
|
||||||
|
* as I move away from inodes as db index.
|
||||||
|
*
|
||||||
|
* Weak, I know.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#if !HAVE_ATOLL
|
||||||
|
|
||||||
|
long long atoll(const char *nptr) {
|
||||||
|
return (long long)atol(nptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* !HAVE_ATOLL */
|
7
src/atoll.h
Normal file
7
src/atoll.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#ifndef _ATOLL_H_
|
||||||
|
#defien _ATOLL_H_
|
||||||
|
|
||||||
|
extern long long atoll(const char *nptr);
|
||||||
|
|
||||||
|
#endif /* _ATOLL_H_ */
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user