* Applying various OpenBSD-related changes. (Thanks SF user sthen23934)
This commit is contained in:
parent
42bd49276f
commit
bc33a34331
@ -28,10 +28,9 @@ minidlnad_LDADD = \
|
|||||||
@LIBAVFORMAT_LIBS@ \
|
@LIBAVFORMAT_LIBS@ \
|
||||||
@LIBAVUTIL_LIBS@ \
|
@LIBAVUTIL_LIBS@ \
|
||||||
@LIBEXIF_LIBS@ \
|
@LIBEXIF_LIBS@ \
|
||||||
@LIBRT_LIBS@ \
|
|
||||||
@LIBINTL@ \
|
@LIBINTL@ \
|
||||||
@LIBICONV@ \
|
@LIBICONV@ \
|
||||||
-lpthread -lFLAC $(flacoggflag) $(vorbisflag)
|
-lFLAC $(flacoggflag) $(vorbisflag)
|
||||||
|
|
||||||
minidlnad_LDFLAGS = @STATIC_LDFLAGS@
|
minidlnad_LDFLAGS = @STATIC_LDFLAGS@
|
||||||
|
|
||||||
@ -43,7 +42,7 @@ testupnpdescgen_LDADD = \
|
|||||||
@LIBAVFORMAT_LIBS@ \
|
@LIBAVFORMAT_LIBS@ \
|
||||||
@LIBAVUTIL_LIBS@ \
|
@LIBAVUTIL_LIBS@ \
|
||||||
@LIBEXIF_LIBS@ \
|
@LIBEXIF_LIBS@ \
|
||||||
-lpthread -lFLAC $(flacoggflag) $(vorbisflag)
|
-lFLAC $(flacoggflag) $(vorbisflag)
|
||||||
|
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
16
configure.ac
16
configure.ac
@ -99,8 +99,7 @@ AC_COMPILE_IFELSE(
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
AC_CHECK_LIB([rt], [clock_gettime], [LIBRT_LIBS="-lrt" AC_DEFINE([HAVE_LIBRT], [1], [use clock_gettime])],)
|
AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [use clock_gettime])],)
|
||||||
AC_SUBST(LIBRT_LIBS)
|
|
||||||
])
|
])
|
||||||
|
|
||||||
################################################################################################################
|
################################################################################################################
|
||||||
@ -462,28 +461,28 @@ AC_CHECK_FUNCS(inotify_init, AC_DEFINE(HAVE_INOTIFY,1,[Whether kernel has inotif
|
|||||||
################################################################################################################
|
################################################################################################################
|
||||||
### Build Options
|
### Build Options
|
||||||
|
|
||||||
AC_ARG_WITH(logpath,
|
AC_ARG_WITH(log-path,
|
||||||
AS_HELP_STRING([--with-log-path=PATH],[Default log path]),
|
AS_HELP_STRING([--with-log-path=PATH],[Default log path]),
|
||||||
[with_logpath="$withval"],[with_logpath="/var/log"])
|
[with_logpath="$withval"],[with_logpath="/var/log"])
|
||||||
AC_DEFINE_UNQUOTED([DEFAULT_LOG_PATH],"${with_logpath}",[Log path])
|
AC_DEFINE_UNQUOTED([DEFAULT_LOG_PATH],"${with_logpath}",[Log path])
|
||||||
|
|
||||||
|
|
||||||
AC_ARG_WITH(dbpath,
|
AC_ARG_WITH(db-path,
|
||||||
AS_HELP_STRING([--with-db-path=PATH],[Default DB path]),
|
AS_HELP_STRING([--with-db-path=PATH],[Default DB path]),
|
||||||
[with_dbpath="$withval"],[with_dbpath="/var/cache/minidlna"])
|
[with_dbpath="$withval"],[with_dbpath="/var/cache/minidlna"])
|
||||||
AC_DEFINE_UNQUOTED([DEFAULT_DB_PATH],"${with_dbpath}",[DB path])
|
AC_DEFINE_UNQUOTED([DEFAULT_DB_PATH],"${with_dbpath}",[DB path])
|
||||||
|
|
||||||
AC_ARG_WITH(osname,
|
AC_ARG_WITH(os-name,
|
||||||
AS_HELP_STRING([--with-os-name=NAME],[OS Name]),
|
AS_HELP_STRING([--with-os-name=NAME],[OS Name]),
|
||||||
[with_osname="$withval"],[with_osname="$(uname -s)"])
|
[with_osname="$withval"],[with_osname="$(uname -s)"])
|
||||||
AC_DEFINE_UNQUOTED([OS_NAME],"${with_osname}",[OS Name])
|
AC_DEFINE_UNQUOTED([OS_NAME],"${with_osname}",[OS Name])
|
||||||
|
|
||||||
AC_ARG_WITH(osver,
|
AC_ARG_WITH(os-version,
|
||||||
AS_HELP_STRING([--with-os-version=VERS],[OS Version]),
|
AS_HELP_STRING([--with-os-version=VERS],[OS Version]),
|
||||||
[with_osver="$withval"],[with_osver="$(uname -r)"])
|
[with_osver="$withval"],[with_osver="$(uname -r)"])
|
||||||
AC_DEFINE_UNQUOTED([OS_VERSION],"${with_osver}",[OS Version])
|
AC_DEFINE_UNQUOTED([OS_VERSION],"${with_osver}",[OS Version])
|
||||||
|
|
||||||
AC_ARG_WITH(osurl,
|
AC_ARG_WITH(os-url,
|
||||||
AS_HELP_STRING([--with-os-url=URL],[OS URL]),
|
AS_HELP_STRING([--with-os-url=URL],[OS URL]),
|
||||||
[with_osurl="$withval"],[with_osurl="http://www.netgear.com"])
|
[with_osurl="$withval"],[with_osurl="http://www.netgear.com"])
|
||||||
AC_DEFINE_UNQUOTED([OS_URL],"${with_osurl}",[OS URL])
|
AC_DEFINE_UNQUOTED([OS_URL],"${with_osurl}",[OS URL])
|
||||||
@ -579,6 +578,9 @@ case "$target_os" in
|
|||||||
;;
|
;;
|
||||||
linux*)
|
linux*)
|
||||||
;;
|
;;
|
||||||
|
openbsd*)
|
||||||
|
OS_URL=http://www.openbsd.org/
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown OS : $target_os"
|
echo "Unknown OS : $target_os"
|
||||||
;;
|
;;
|
||||||
|
4
uuid.c
4
uuid.c
@ -52,7 +52,7 @@ monotonic_us(void)
|
|||||||
{
|
{
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
|
|
||||||
#if defined(HAVE_LIBRT)
|
#if HAVE_CLOCK_GETTIME
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
#elif HAVE_CLOCK_GETTIME_SYSCALL
|
#elif HAVE_CLOCK_GETTIME_SYSCALL
|
||||||
syscall(__NR_clock_gettime, CLOCK_MONOTONIC, &ts);
|
syscall(__NR_clock_gettime, CLOCK_MONOTONIC, &ts);
|
||||||
@ -173,7 +173,7 @@ generate_uuid(unsigned char uuid_out[16])
|
|||||||
* nanosecond intervals since 00:00:00.00, 15 October 1582 (the date of
|
* nanosecond intervals since 00:00:00.00, 15 October 1582 (the date of
|
||||||
* Gregorian reform to the Christian calendar).
|
* Gregorian reform to the Christian calendar).
|
||||||
*/
|
*/
|
||||||
#if HAVE_LIBRT
|
#if HAVE_CLOCK_GETTIME
|
||||||
clock_gettime(CLOCK_REALTIME, &ts);
|
clock_gettime(CLOCK_REALTIME, &ts);
|
||||||
#elif HAVE_CLOCK_GETTIME_SYSCALL
|
#elif HAVE_CLOCK_GETTIME_SYSCALL
|
||||||
syscall(__NR_clock_gettime, CLOCK_REALTIME, &ts);
|
syscall(__NR_clock_gettime, CLOCK_REALTIME, &ts);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user