Make use of clock_gettime() on OpenBSD.
ok sthen@
This commit is contained in:
parent
fdd0279249
commit
4cfd1cae42
@ -1,10 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.99 2013/03/11 11:35:44 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.100 2013/04/04 16:48:22 brad Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
COMMENT= multimedia decoding library
|
||||
|
||||
DISTNAME= xine-lib-1.2.2
|
||||
REVISION= 0
|
||||
CATEGORIES= multimedia
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xine/}
|
||||
EXTRACT_SUFX= .tar.xz
|
||||
|
16
multimedia/xine-lib/patches/patch-src_xine-engine_demux_c
Normal file
16
multimedia/xine-lib/patches/patch-src_xine-engine_demux_c
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-src_xine-engine_demux_c,v 1.3 2013/04/04 16:48:22 brad Exp $
|
||||
|
||||
Make use of clock_gettime() on OpenBSD. Until we have per-process
|
||||
timers and can enable _POSIX_TIMERS in unistd.h.
|
||||
|
||||
--- src/xine-engine/demux.c.orig Wed Apr 3 18:45:50 2013
|
||||
+++ src/xine-engine/demux.c Wed Apr 3 19:01:24 2013
|
||||
@@ -132,7 +132,7 @@ static struct timespec _x_compute_interval(unsigned in
|
||||
ui.QuadPart += millisecs * 10000;
|
||||
ts.tv_sec = ui.QuadPart / 10000000;
|
||||
ts.tv_sec = (ui.QuadPart % 10000000)*100;
|
||||
-#elif _POSIX_TIMERS > 0
|
||||
+#elif _POSIX_TIMERS > 0 || defined(__OpenBSD__)
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
uint64_t ttimer = (uint64_t)ts.tv_sec*1000 + ts.tv_nsec/1000000 + millisecs;
|
||||
ts.tv_sec = ttimer/1000;
|
17
multimedia/xine-lib/patches/patch-src_xine-utils_utils_c
Normal file
17
multimedia/xine-lib/patches/patch-src_xine-utils_utils_c
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-src_xine-utils_utils_c,v 1.6 2013/04/04 16:48:22 brad Exp $
|
||||
|
||||
Make use of clock_gettime() on OpenBSD. Until we have per-process
|
||||
timers and can enable _POSIX_TIMERS in unistd.h.
|
||||
|
||||
--- src/xine-utils/utils.c.orig Wed Apr 3 18:51:41 2013
|
||||
+++ src/xine-utils/utils.c Wed Apr 3 19:04:04 2013
|
||||
@@ -671,7 +671,8 @@ void xine_xprintf(xine_t *xine, int verbose, const cha
|
||||
|
||||
int xine_monotonic_clock(struct timeval *tv, struct timezone *tz)
|
||||
{
|
||||
-#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK) && defined(HAVE_POSIX_TIMERS)
|
||||
+#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK) && defined(HAVE_POSIX_TIMERS) || \
|
||||
+ defined(__OpenBSD__)
|
||||
static int initialized = 0;
|
||||
static int use_clock_monotonic = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.168 2013/03/27 13:34:06 brad Exp $
|
||||
# $OpenBSD: Makefile,v 1.169 2013/04/04 16:49:56 brad Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
@ -8,9 +8,9 @@ COMMENT-jack= JACK audio output module for VLC
|
||||
V= 2.0.5
|
||||
DISTNAME= vlc-${V}
|
||||
PKGNAME-main= ${DISTNAME}
|
||||
REVISION-main= 5
|
||||
REVISION-main= 6
|
||||
PKGNAME-jack= vlc-jack-${V}
|
||||
REVISION-jack= 1
|
||||
REVISION-jack= 2
|
||||
CATEGORIES= x11
|
||||
MASTER_SITES= http://download.videolan.org/pub/videolan/vlc/${V}/
|
||||
EXTRACT_SUFX= .tar.xz
|
||||
|
25
x11/vlc/patches/patch-src_misc_mtime_c
Normal file
25
x11/vlc/patches/patch-src_misc_mtime_c
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-src_misc_mtime_c,v 1.1 2013/04/04 16:49:56 brad Exp $
|
||||
|
||||
Make use of clock_gettime() on OpenBSD. Until we have per-process
|
||||
timers and can enable _POSIX_TIMERS in unistd.h.
|
||||
|
||||
--- src/misc/mtime.c.orig Wed Apr 3 19:04:51 2013
|
||||
+++ src/misc/mtime.c Wed Apr 3 19:06:10 2013
|
||||
@@ -42,7 +42,7 @@
|
||||
#if !defined (_POSIX_TIMERS)
|
||||
# define _POSIX_TIMERS (-1)
|
||||
#endif
|
||||
-#if (_POSIX_TIMERS > 0)
|
||||
+#if (_POSIX_TIMERS > 0) || defined(__OpenBSD__)
|
||||
# include <time.h> /* clock_gettime() */
|
||||
#else
|
||||
# include <sys/time.h>
|
||||
@@ -234,7 +234,7 @@ mtime_t date_Decrement( date_t *p_date, uint32_t i_nb_
|
||||
*/
|
||||
uint64_t NTPtime64 (void)
|
||||
{
|
||||
-#if (_POSIX_TIMERS > 0)
|
||||
+#if (_POSIX_TIMERS > 0) || defined(__OpenBSD__)
|
||||
struct timespec ts;
|
||||
|
||||
clock_gettime (CLOCK_REALTIME, &ts);
|
25
x11/vlc/patches/patch-src_posix_thread_c
Normal file
25
x11/vlc/patches/patch-src_posix_thread_c
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-src_posix_thread_c,v 1.1 2013/04/04 16:49:56 brad Exp $
|
||||
|
||||
Make use of clock_gettime() on OpenBSD. Until we have per-process
|
||||
timers and can enable _POSIX_TIMERS in unistd.h.
|
||||
|
||||
--- src/posix/thread.c.orig Wed Apr 3 18:53:13 2013
|
||||
+++ src/posix/thread.c Wed Apr 3 18:59:55 2013
|
||||
@@ -73,7 +73,7 @@
|
||||
# define _POSIX_MONOTONIC_CLOCK (-1)
|
||||
#endif
|
||||
|
||||
-#if (_POSIX_TIMERS > 0)
|
||||
+#if (_POSIX_TIMERS > 0) || defined(__OpenBSD__)
|
||||
static unsigned vlc_clock_prec;
|
||||
|
||||
# if (_POSIX_MONOTONIC_CLOCK > 0) && (_POSIX_CLOCK_SELECTION > 0)
|
||||
@@ -921,7 +921,7 @@ void vlc_control_cancel (int cmd, ...)
|
||||
*/
|
||||
mtime_t mdate (void)
|
||||
{
|
||||
-#if (_POSIX_TIMERS > 0)
|
||||
+#if (_POSIX_TIMERS > 0) || defined(__OpenBSD__)
|
||||
struct timespec ts;
|
||||
|
||||
vlc_clock_setup ();
|
Loading…
x
Reference in New Issue
Block a user