mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-09 13:39:47 -05:00
Fix for "my libc doesn't have atoll" bug.
This commit is contained in:
@@ -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 \
|
||||
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 \
|
||||
atoll.c atoll.h \
|
||||
$(PRENDSRC) $(ORENDSRC) $(HRENDSRC) $(OGGVORBISSRC)
|
||||
|
||||
EXTRA_DIST = mDNS.c mDNSClientAPI.h mDNSDebug.h mDNSPosix.c \
|
||||
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 \
|
||||
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_ */
|
||||
|
||||
Reference in New Issue
Block a user