[vlc-devel] OpenBSD build fix
Joris van Rooij
jorrizza at jrrzz.net
Thu May 7 16:45:45 CEST 2009
Hello,
I've attached some more fixes to get things running on OpenBSD.
S_I*USR are defined in sys/stat.h
It's not _POSIX_THREAD_PRIORITY_SCHEDULING but _POSIX_PRIORITY_SCHEDULING.
For the difference see Linux posixoptions(7). According to POSIX,
_POSIX_PRIORITY_SCHEDULING is either not defined, -1, 0 or 200112L. It was
indeed my bad not to check it for -1, but undefined equals to 0 in
conditional preprocessor statements. I believe the following patch is the
right way of checking it.
I haven't been able to find a single machine with a machine/soundcard.h. So
the attached patch should be enough to make it compile from git on OpenBSD.
Greetings,
Joris
-------------- next part --------------
diff --git a/src/config/file.c b/src/config/file.c
index 482f629..a44a9ab 100644
--- a/src/config/file.c
+++ b/src/config/file.c
@@ -34,6 +34,7 @@
#include <assert.h>
#include <limits.h>
#include <fcntl.h>
+#include <sys/stat.h>
#ifdef __APPLE__
# include <xlocale.h>
#else
-------------- next part --------------
diff --git a/src/misc/threads.c b/src/misc/threads.c
index b4da0f6..742e1a1 100644
--- a/src/misc/threads.c
+++ b/src/misc/threads.c
@@ -784,7 +784,7 @@ int vlc_clone (vlc_thread_t *p_handle, void * (*entry) (void *), void *data,
pthread_sigmask (SIG_BLOCK, &set, &oldset);
}
-#if (_POSIX_THREAD_PRIORITY_SCHEDULING >= 0)
+#if defined _POSIX_PRIORITY_SCHEDULING && _POSIX_PRIORITY_SCHEDULING >= 0
{
struct sched_param sp = { .sched_priority = priority, };
int policy;
-------------- next part --------------
diff --git a/modules/access/oss.c b/modules/access/oss.c
index 61999f0..7ea6527 100644
--- a/modules/access/oss.c
+++ b/modules/access/oss.c
@@ -45,7 +45,12 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
-#include <sys/soundcard.h>
+#ifdef HAVE_SYS_SOUNDCARD_H
+# include <sys/soundcard.h>
+#endif
+#ifdef HAVE_SOUNDCARD_H
+# include <soundcard.h>
+#endif
#include <poll.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090507/aecef07d/attachment.sig>
More information about the vlc-devel
mailing list